i want to store it in a variable. like: employeedetails = “employees”:[
{“firstName”:“John”, “lastName”:“Doe”},
{“firstName”:“Anna”, “lastName”:“Smith”},
{“firstName”:“Peter”, “lastName”:“Jones”}
]
if i store it direct(in employeedetails) like above example it give me syntax error.
“chandu” wrote:
If anybody have any idea please share..How to Store a json object in variable?
If the use case is that you are getting a JSON string from somewhere (like a web service) that you want to work with,
then the answer is to use the ParseJSON function to convert it to a BrightScript object representation.
ParseJSON will also handle things like embedded quotation marks and escape sequences in string values, null values, etc., and it will automatically handle the keys as case-sensitive / case-preserving.