This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes placing json data in <body> returned from ajax Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "placing json data in <body> returned from ajax" Watch "placing json data in <body> returned from ajax" New topic
Author

placing json data in <body> returned from ajax

naveen yadav
Ranch Hand

Joined: Oct 23, 2011
Posts: 384

Hi ranchers,
i'm getting the json data from GET request. now i want to place inside <body> tag in proper order.
json.items returns the array
like



And there are 10 or more such items array in json data.
Now i want to display some items element in some order like






I tired like this


but it is showing like



how can i get desired order ?

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61315
    
  66

append the new elements in the order you want to the same parent.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
naveen yadav
Ranch Hand

Joined: Oct 23, 2011
Posts: 384

made changes this



and that



And it worked......this is best place....
Thanks Bear.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61315
    
  66

 
GeeCON Prague 2014
 
subject: placing json data in <body> returned from ajax