Converting JSON using jQuery

Viewed 126

For reference, this is the JSON I'm working with: http://goo.gl/xxHci0

In regular JavaScript, using the code below works fine and I can manipulate it easily:

var info = JSON.parse(document.getElementsByTagName("pre")[0].innerHTML);
alert(info[0]["AssetId"]);

But I'm working on a jQuery version of the same code to avoid using methods like iFrames to get this data. My jQuery function is:

$.get (
    page,
    function parse(data) {
        var r = $.parseJSON(data);
        alert(r[0]["AssetId"]);
    }
);

I found ways to convert the JSON using jQuery, but I'm having trouble finding where the JSON code is that needs to be converted.

2 Answers
Related