Can I dynamically extract fields from a document?

Can I dynamically select fields from my document to return, based on a query? Say I have a document like so:


I would like the returned friends to include only those with an age above 21, e.g:


Can I do this in a query (presumably with a script), or must I do it after the response has been received?

take a look at the nested datatype and its corresponding queries and especially the inner hits functionality.


This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.