How do I parse this? I’m working with WordPress and jQuery.
{
"MyCustomOutput": [
{
"id": "2",
"name": "This is the name of the custom output",
"version": "1.00",
"description": "This is the Description",
"changelog": "This is the change log history....",
"updated": "1261274072"
}
]
}
I tried something like:
var d = JSON.parse(data);
$("#version").html(data);
$("#version").html(d.MyCustomOutput.version);
But I have no idea what I’m doing with jQuery or JavaScript
To access data members:
Also, it is helpful to use the FireBug firefox extension to debug your scripts. Just set a breakpoint to step through your code. You will have a “live” view of these data structures and can even add watches to test short code snippets to see if you are doing things correctly.