How can I use expressions to read from a nested Json object?
I wanna read value of key "value".
{"cid":-1,"data":{"value":0},"code":200}
Have you tried the jsonGet
expression function? Your expression would be something like
jsonGet("{'cid':-1,'data':{'value':0},'code':200}", "data.value")
Edit: fixed "
vs '
That didn't work unfortunately.
Whoops, my example was wrong because the keys are also using "
, so each key is essentially 'escaping' the string. It should be jsonGet("{'cid':-1,'data':{'value':0},'code':200}", "data.value")
Note the weird shading of the json string in your screenshot. The entirety of the json string text should be a purple color.
2 Likes