How can I get value of Json in jQuery

I have following Json string (returned from server) :


[{"rurl":"Asia.com","status":1,"recordType":0}, {"rurl":"Africa.com","status":1,"recordType":0}]

Iam using following code to get JSON values but Iam getting “UNDEFINED” value. I want to access “rurl” => “Africa.com


success: function(data) {
                                       var encoded = jQuery.toJSON(data);
                                       alert(jQuery.evalJSON(encoded).rurl);


Can some one guide me, what and where Iam doing wrong. And how can rectify it.

Thanks in advance

You have to learn to debug your own code.

There is no “toJSON” or “evalJSON”, just parseJSON.

http://api.jquery.com/?ns0=1&s=JSON&go=

Make sure you tell jQuery you’re expecting a JSON response:



$.post(url, params, function(data) {
    console.info(data); // this will be a javascript object
}, "json");