How do I query cloudant for a specific value inside an array?

Clash Royale CLAN TAG#URR8PPP
How do I query cloudant for a specific value inside an array?
[Cloudant - Node JS]
Hi all,
We are building an Iot platform with a cloudant DB. So we have this JSON format in DB:
"_id": "1",
"_rev": "4-d6286747ab0c1b9bb66ea3a5733c1a80",
"clientID": "User1",
"sites": [
"siteId": "000001",
"country": "Uk"
,
"siteId": "000003",
"country": "Uk"
]
I would like to retrieve the clientID from the siteId using a find, but cloudant doesn't let me access the data in the sites array from the selector.
Does anybody here have a solution to do that? It would be highly appreciated! :)
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.