I have a documents with many nested fields and array of objects inside them. So when I perform search, how can I get only the matching object inside the array of object, not the entire document?
{
"name": "Olivia",
"jobs": [
{
"title": "Accountant",
"offices": [
{
"city": "Paris",
"address": "Her adress"
},
{
"city": "NYC",
"address": "New adress"
}
]
},
{
"title": "Judge",
"offices": [
{
"city": "Paris",
"address": "Judge adress"
},
{
"city": "NYC",
"address": "New judge adress"
}
]
}
]
}
Jobs and offices are nested What I want to have in my search are: her name, jobs and offices where the city is "Paris", in normal search I get both of the offices where city are Paris and NYC
Is there a way to get only the offices having "Paris" as city?