I'm trying to write a cosmos query that return a list of ids, which contain duplicates in a string array that exists on each record.
Here's an example of the dataset I'm working with. using this data, only the id of A and B should be returned as their "things" array contains at least one duplicate strings.
[
{
"id": "A",
"things": [
"1",
"1",
"2",
"2",
"3"
]
},
{
"id": "B",
"things": [
"1",
"1",
"2",
"3"
]
},
{
"id": "C",
"things": [
"1",
"2",
"3"
]
}
]
I've tried to use a subquery, but can't seem to get that to work.