I would like to find find how many times an element occurs.From the sample I want to get the element count. If we see the data. Elements appear twice also the inner element like Name appears twice. Like that I want to find the count of element occurrence.
I tried seeing some group by clause and could not find any group by option in CosmosDB.
{ "data": [ [ { "Elements": [ { "Name": "Ma", "Gender": "Male", "City": "Newyork", "State": "Newyork" }, { "Gender": "Female", "City": "Los Angeles", "State": "California" }, { "Name": "Bruce", "Gender": "Male", "City": "Chicago" } ], "Subdivided": [ { "Low": "20", "Block": "227", "Subcode": "MIRROR", "Legal_Desc_Map_Plat_Type_Indicator": "PLA" } ], "Elements": [ { "Name": "Ma", "Gender": "Male", "City": "Newyork" }, { "Gender": "Female", "City": "Los Angeles", "State": "California" }, { "Name": "Bruce", "Gender": "Male", "State": "Illinois" } ] } ] ], "_ts": 1559463991 }
Result something like. Element = 2, Element.Name = 2 etc like that.
[]
, you don't needdata[0]
. – Jay Gong