How to get the value of ID in followign json string in javascript

hi to all

I am using ajax to get the followign json string from php

i show the string in javascript

{“bindings”: [{“ID”: “1”,“Name”: “Movies”,“Image”: “movie.jpg”},{“ID”: “2”,“Name”: “Songs”,“Image”: “song.jpg”}]};

now i want to get ID value in javascript

regards.

Convert the string to an object:


var obj = eval('(' + jsonStr + ')');

Then query the object’s properties:


var ID = obj.bindings[0].ID;