Welcome Guest, Not a member yet? Register   Sign In
How to extract data from JSON string by using JQuery
#5

[eluser]Victor Michnowicz[/eluser]
.getJSON returns the JSON object, so you don't need to convert it again using .parseJSON().

I think this should work:

Code:
$.getJSON("http://localhost/CI/index.php/welcome/chromeExtension", function(data) {
    for (var i in data)
    {
        alert(data[i].ThreadID);
    }
});

I recommend Firebug when dealing with this kind of stuff. It can help a lot. Make sure you set your headers correctly too.


Messages In This Thread
How to extract data from JSON string by using JQuery - by El Forum - 01-17-2011, 07:31 AM
How to extract data from JSON string by using JQuery - by El Forum - 01-17-2011, 08:35 AM
How to extract data from JSON string by using JQuery - by El Forum - 01-17-2011, 08:58 AM
How to extract data from JSON string by using JQuery - by El Forum - 01-17-2011, 10:54 AM
How to extract data from JSON string by using JQuery - by El Forum - 01-17-2011, 11:03 AM
How to extract data from JSON string by using JQuery - by El Forum - 01-20-2011, 12:53 AM
How to extract data from JSON string by using JQuery - by El Forum - 01-20-2011, 07:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB