Suppose I have 3 objects in DocumentDB like this.
This is the class record.
And now I want to get all the Id's where a student exist with name sunny.
{
"id": "111",
"class": 1,
"students": [
{
"name": "sunny"
},
{
"name": "pinki"
},
{
"name": "bobby"
},
{
"name": "lucky"
}
]
}
{
"id": "222",
"class": 2,
"students": [
{
"name": "pinki"
},
{
"name": "sunny"
},
{
"name": "bobby"
}
]
}
{
"id": "333",
"class": 3,
"students": [
{
"name": "pinki"
},
{
"name": "lucky"
},
{
"name": "bobby"
}
]
}
What will be the query to get the result?