I encoded a mysql result from php to json.. I need to decode it in javascript. Say my string returned is
[{"0":"x","1":"z"},{"0":"xs","1":"zz"}]
Please help me on how to get the value of a particular row and column.. for instance how to get the value of “0” of the second row.
EDIT:
Sorry for bothering friends my mistake.. the typeof returned as string JSON.parse(data) did the trick..
gives you the
xsThe
[]represents an array structure, with each{}being an element in the array. Then, within each object there is a set of attributes, which you get it via the attribute’s identifier. In this case, it’s 0, so it could have just be 0 as well.