Question Jose Sabike Raja · Feb 14, 2018

How can get the data stored in the JSON object?

How can get the data stored in the JSON object?  I try StringObject but doesn't work.

Comments

Jose Sabike Raja  Feb 14, 2018 to Eduard Lebedyuk

I am in 2016.1.0.

I ask how to get the data from JSON object, not from JSON. 

0
Eduard Lebedyuk  Feb 14, 2018 to Jose Sabike Raja

Almost the same:

set json = "{""prop"":1}"
set obj = {}.$fromJSON(json)
write obj.prop

Documentation.

0
PILAR GUERRERO · Feb 19, 2018

If you have:

set json = "{""name"":""Sara""}"

You can get the data stored :

set dynObj = ##class(%DynamicObject).%FromJSON(json)

write dynObj.name

0