I’m performing a query that could return a significiant number of documents and only want to get a subset of the data in each document. Is there a way to requst the data and retain the origianl format of the document. For example, the document is an object that contatains three objects:
{
"header": {
"title" : "My Title",
"subTitle": "More Information"
},
"author": "johndoe_12345",
"body": {
"mainContent": "Inventore autem cupiditate odit ab et ducimus. Qui similique dolor mollitia sed quo doloribus necessitatibus accusamus. Alias qui et eum nisi est sapiente repellendus et voluptatibus illo veniam sequi consequatur ea.",
"excerpt":"Inventore autem cupiditate."
}
}
The query is
select header.title, body.excerpt
from `articles`
where autor = "johndoe_12345"
The results is
{
"title" : "My Title",
"excerpt":"Inventore autem cupiditate."
}
The desired result is
{
"header": {
"title" : "My Title"
},
"body": {
"excerpt":"Inventore autem cupiditate."
}
}