We have a below document structure.
{
"id":"GUID",
"customer": {
"contacts": [
{
"type": "MOBILE",
"status": "CONFIRMED",
"value": "xxxx"
},
{
"type": "EMAIL",
"status": "CONFIRMED",
"value": "aaaa"
}
],
"addresses": [
{
"country": "xxx"
}
]
}
}
and need to search for customer->contacts where value="aaaa". I tried with below options
1) SELECT c.id FROM c
join customer in c.customer
join contacts in c.customer.contacts
where contacts.value = "aaaa"
2) SELECT c.id FROM c WHERE c.customer.contacts[0].value= "aaaa"
Getting Syntax error 400 bad request Any help highly appreciated