I have cosmos db document structure as
{
"studentId": "lkjsdvoijwvsd",
"studentFirstName": "FirstName",
"studentLastName": "lastanme",
"email": "abc.xyz@example.com",
"phone": "(111) 444-5555",
"registeredCourses": [
"courseId1",
"courseId2",
"courseId3",
"courseId4"
]
}
I have been provided with an input array : ["courseId2","courseId5"]
.
I need to fetch all of the documents which have registeredCourses in input array.
For the above input array I need to fetch all the document which has at least one of the element from input array in registeredCourses
I am trying to get result from :
select *
from c
where (c.registeredCourses INTERSECT ["courseId1, "courseId5"] is not blank )