Using the Reserved Text Field Name in DocumentDB

I inherited a database loaded into DocumentDB where the field name is set to "Value". An example of my structure:

{
...
   "Alternates": [
      "Type": "ID",
      "Value" : "NOCALL"
   ]
}

when I query (using documentDB SQL) trying to return all documents where Alternates.Value = "NOCALL",I get a syntax error near

Error "Value"

. If I ask Type = "ID",, everything will be all right.

It seems that the word Value, which has a special meaning in DocumentDB, is causing the problem.

Putting punctuation (e.g. quotes / double quotes) around the value "Value" does not seem to help.

Any suggestion on how to solve this problem would be greatly appreciated!

Thank you in advance!

+4
source share
1

. - . , [""].

,

"": [      "": "ID",      "": "NOCALL"  ]

SELECT c FROM c WHERE alt [ "Value" ] = 'NOCALL'

+11

All Articles