Hi,
I tried to to access the following json:
var data = [
{
"nodes"
:
[
{
"id"
:
"node_id_1"
,
"label"
:
"node_label_1"
,
"title"
:
""
,
"group"
:
"0"
,
"content"
:
""
,
"x"
:
"-305.451"
,
"y"
:
"-173.162"
}
,
{
"id"
:
"node_id_2"
,
"label"
:
"node_label_2"
,
"title"
:
""
,
"group"
:
"0"
,
"content"
:
""
,
"x"
:
"-234.961"
,
"y"
:
"-98.5864"
}
]
}
,
{
"edges"
:
[
{
"id"
:
"6"
,
"from"
:
"node_id_8"
,
"to"
:
"node_id_5"
,
"label"
:
"6"
,
"title"
:
"6"
,
"group"
:
"node_id_8"
,
"content"
:
"node_id_5"
}
,
{
"id"
:
"undefined"
,
"from"
:
"node_id_8"
,
"to"
:
"node_id_5"
,
"label"
:
"undefined"
,
"title"
:
"undefined"
,
"group"
:
"node_id_8"
,
"content"
:
"node_id_5"
}
]
}
]
It is well formatted but alert(data.nodes[0].id); gives me "data.nodes is not defined".
Could you give me a hint why?
Thanks a lot in advance!
Peter