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

The name of the pictureThe name of the pictureThe name of the pictureClash 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.

Popular posts from this blog

make 2 or more post in bootsrap

Store custom data using WC_Cart add_to_cart() method in Woocommerce 3

Firebase Auth - with Email and Password - Check user already registered