Is there a way to convert it into object form? So that each field of the result can be accessed results[i].field where i is the number of records in the mysql result..
This is my JSON String http://pastebin.com/Cky1va3K
Is there a way to convert it into object form? So that each field of the result can be accessed results[i].field where i is the number of records in the mysql result.. This is my JSON String http://pastebin.com/Cky1va3K |
|||
|
Sure. That's what JSON is for, really; it stands for JavaScript Object Notation. A JSON object is a JavaScript object literal. See the official JSON documentation on using JSON in JavaScript here. Some browsers have native support for JSON parsing (so you don't have to use |
|||
|
if you paste this string serverside into JavaScript code, it is converted automatically.
|
|||||
|