{
"id": "3d50809d-d631-4576-925a-7232d9ef9338",
"TrackingId": "3d50809d-d631-4576-925a-7232d9ef9338",
"records": [
{
"measurementTime": {
"value": "2018-04-01 10:00:00.000",
"unit": "datetime"
},
"systolic": {
"value": 114,
"unit": "mm(hg)"
},
"diastolic": {
"value": 88,
"unit": "mm(hg)"
}
}
]
},
{
"id": "c5f3bd10-1959-4407-92cb-6d9548950f2c",
"TrackingId": "c5f3bd10-1959-4407-92cb-6d9548950f2c",
"records": [
{
"measurementTime": {
"value": "2018-04-02 10:00:00.000",
"unit": "datetime"
},
"systolic": {
"value": 122,
"unit": "mm(hg)"
},
"diastolic": {
"value": 91,
"unit": "mm(hg)"
}
}
]
}
I am trying to querying documents in Azure Docuemnt DB having this sample format. (please don't try to validate JSON or property names in query, i am giving just a stripped of version to understand hierarchy)
I am successfully querying some properties, but i am getting error when trying to fetch the integer value under systolic--> value or diastolic--> value with the query mentioned below.
Success Query:
SELECT
c.id,
c.TrackingId,
c.records[0].measurementTime["value"]
Failure Query:
SELECT
c.id,
c..TrackingId,
c.records[0].measurementTime["value"],
c.records[0].systolic["value"],
c.records[0].diastolic["value"]
the keyword usage of ["value"] is working for measuremenTtime but not working for systolic or diastolic
Error details:
Message : "Object creation error, property name 'value' specified more than once.
code:400
severity: Error
