views:

1910

answers:

2

Hello,

I have been using $.each of the jQuery framework to iterate through a JSON string that I receive via an AJAX call. Now this string is sometimes quite huge and as a result IE6/7/8 crawl as a result.

I am wondering if there is a faster way to iterate through the entire data.

Thank you for your time.

+1  A: 

How about using the regular javascript functions?

If for example you have a JSON object with items in them, you could just eval the JSON string to convert it to javascript objects, and iterate over them using 'for (i in object)'.

ylebre
I assume Alec is using the json dataType in the xhr call therefore jquery will be eval'ing the response.
redsquare
thats correct redsquare
Alec Smart
+3  A: 

some good clientside parsing & performance tips from flickr

redsquare
Thats a really good article. Good keep in mind.
Alex