Fastest way to iterate through JSON string in Javascript

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.


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)'.

链接地址: http://www.djcxy.com/p/70066.html

上一篇: 如何遍历包含对象的数组并访问其属性

下一篇: 在Javascript中迭代JSON字符串的最快方法