| Author |
Ajax JSON looping in jQuery
|
Tarik Ansari
Ranch Hand
Joined: Dec 31, 2008
Posts: 40
|
|
Hi All,
I am new to jQuery, could you please let me know how do i loop the below JSON and display result in success of AJAX (Result appended in a div)
JSON format
Below AJAX method
Any leads on how to loop and display the JSON object would be appreciated.
Thanks
Tarik
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56191
|
|
Tarik Ansari wrote:Any leads would be appreciated.
Any leads on what? What's the problem?
Also, please edit your post to properly indent the JavaScript code. Unformatted/unindented code is harder to read.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
There is no need to parse the JSON, it should be in JSON already.
Eric
|
 |
Tarik Ansari
Ranch Hand
Joined: Dec 31, 2008
Posts: 40
|
|
|
Eric, JSON is already available, i need to know how to loop the result of the JSON (Say for loop JSON object and pull the value)
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56191
|
|
Once it's been evaluated, it's no longer JSON. JSON is the serialized text format; after evaluation, it's just a JavaScript object like any other.
As it's not any array, why the need to "loop"? Are are you trying to iterate over the properties rather than directly address them?
|
 |
 |
|
|
subject: Ajax JSON looping in jQuery
|
|
|