11

I have an object which looks like this:

{"response":{"mydata":[{"xxx:id":"8c8b9703-bc87-40d8-b8d7-f71ebff4002a","Description":"Tsameple desc"].....

Now, my question is, How do I access the Id field?

I have tried

$.response.mydata[i].xxx:id

However, this is resulting in an error thanks to the ":" in the key value. Any tips on how I can get the value?

Denys Séguret
  • 372,613
  • 87
  • 782
  • 758
Sathya Nagarjun
  • 111
  • 1
  • 1
  • 3

1 Answers1

21

Use the bracket notation :

response.mydata[i]['xxx:id']
Denys Séguret
  • 372,613
  • 87
  • 782
  • 758