I can't seem to access my objects.
after parsing the server string:
var json = JSON.parse(myJsonText):
I get the below with an alert:
alert(json.param1)
{"ID":17,"Name":"swimming pools","ParentID":4,"Path":""},
{"ID":64,"Name":"driveways","ParentID":4,"Path":""}
Now, I am trying to access ID and Name.
I have tried:
json.param1[0].ID
json.param1[0]["ID"]
json.param1[0][0]
And a lot of others that really don't make much sense such as:
json[0].ID or
json.param1.ID etc...
I am getting (for example, in the case of json.param1[0].ID):
param1.0.ID is null or not an object.
Any ideas?