I want to query subdocument which is "fields" object but the record return no results.
My code:
gares.find({"fields": ["id","fields.name"]};
"gares" Model
{"recordid": "1",
"fields": {
"name":"verneuil",
"country":"FR"
},
"id": "585ab055578ee31431df8bf4"}
Response:
[{ "id": "585ab055578ee31431df8bf4"},]
I expect an output as:
[{ "id": "585ab055578ee31431df8bf4"}, "fields":{"name":"verneuil"}]
Someone help me please!
[{ "id": "585ab055578ee31431df8bf4"}, "fields":{"name":"verneuil"}]- AVIVA