I am using Azure Cosmos DB with SQL API and we need to find the DISTINCT values between array of objects in the same document. I have structured the collection in the following ways
"Details":[ { "RID":"1", "RNAME:"Car" }, { "RID":"1", "RNAME:"Car" }]
In second collection, I have multiple documents for each RID and RNAME mapping.
{ "RID":"1", "RNAME:"Car" }
I am using Stored procedure and I need to know which one is a good way to get DISTINCT of RNAME using stored procedure.
Using first collection, I am not sure how to query to find DISTINCT RNAME between objects in the array. Using second collection. when I use the SQL editor, the distinct Query works but not sure how to put it in Stored procedure.
DISTINCT Values of RNAME