-1

I want to query cosmos db where i want to fetch all document where user_list has "13" : true

i want to execute something like this but this sql query is not working i want to know how i can query this document. select * from c where c.user_list.13=true

this is an example document:
     {
          "id": "45923e73-05a8-49e3-9339-1648830d1475",
          "client_id": "999999",
          "user_list": {
            "1": true,
            "2": true,
            "3": true,
            "5": true,
            "6": true,
            "7": true,
            "8": true,
            "9": true,
            "10": true,
            "11": true,
            "12": true,
            "13": true,
            "14": true,
            "15": true
          }
        }
David Makogon
  • 69,407
  • 21
  • 141
  • 189
Mohit Singh
  • 401
  • 1
  • 10
  • 30

1 Answers1

1

Please try something like this SQL:

select * from c where c.user_list['13']=true
Steve Johnson
  • 8,057
  • 1
  • 6
  • 17