Skip to content

Ability to specify fields to return by nested keys #397

@abovedave

Description

@abovedave

Currently, I'm unable to filter specific fields of a Reference object in a Web datasource.

E.g., The query would be fields={"title": 1, "author.name": 1}

{
  "datasource": {
    "key": "articles",
    "source": {
      "endpoint": "1.0/publisher/articles"
    },
    "paginate": 1,
    "count": 1,
    "fields": {
      "title": 1,
      "author.name": 1
    }
  }
}

This returns the title field, but a blank author array (author is a reference field)

{
  "results": [
    {
      "_composed": {
        "author": []
      },
      "_id": "5a946688dc5fc266552d2f25",
      "author": [],
      "title": "Why you should open source your website"
    },
    {
      "_composed": {
        "author": []
      },
      "_id": "5a9684827abb4273bcce608d",
      "author": [],
      "title": "Forming an orderly queue"
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions