user1995781
user1995781

Reputation: 19463

Access dynamic JSON name

I am able to read JSON data from javascript with json.data.groupID[0].name. The groupID is dynamic. I tried to do it with this and it doesn't work:

aa = 'groupA';
json.data[aa[0][name]]

How can I get the json data with the dynamic groupID name?

Thank you.

Upvotes: 0

Views: 33

Answers (1)

Adam Jenkins
Adam Jenkins

Reputation: 55792

You were close:

json.data[aa][0][name]

Upvotes: 1

Related Questions