I have some JSON which I have in a object but I can seem to return the values a sample of the json is as follows.
{
rootLayout:main,
layoutDescriptions:[
{
id:main,
container : {
type:Tabs,
content:[
{
type:Panel,
label:Simple Address,
layout:SimpleForm,
comment:This form is simple name value pairs,
content:[
{ type:label, constraint:newline, text:Org Name },
{ type:text, property:propOne },
{ type:label, constraint:newline, text:Address },
{ type:text, property:addrLine1 },
{ type:text, property:addrLine2 },
{ type:text, property:addrLine3 },
{ type:label, constraint:newline, text:Postcode },
{ type:text, property:postcode }
]
},
I am trying to return the rootLayout using
obj[0].rootLayout.id
This doesn't work also I am wondering how to access the content elements.
I am new to json and I have been thrown in the deep end I think. I cannot find any good reading on the internet can anyone recommend some.
Thanks.