Switch statement from JSON record
Hi , i have a JSON record as follow {value1,value2, value3}
i want to write my switch statement in this form:
<switch> my value <case> value1</case> <case>value2</case> <case>value3</case> </switch>
is there any possibility to extract values from JSON record and put them in a switch statement?
thank's
{value1,value2, value3} - is incorrect in JSON
In JSON we have objects and arrays, every element in an object has name and value, while an array is a just list of values.
So, object in this format.
And array
And anyway not sure what you want to do.
Look at this article in the documentation about working with JSON in Caché.