?
Solved

How display the following JSON object in html using Jquery

Posted on 2011-09-19
1
Medium Priority
?
338 Views
Last Modified: 2012-05-12
hi, I have the following JSON object I need to display it using Jqury as a list of links like the following format:
1- <a href="Article_Url">Article_Title</a>
2- <a href="Article_Url">Article_Title</a>
...
Here is the JSON object:
{{"Columns":["id","Article_Url","Article_Title","Date","num"],"Rows":[["5bb93b83-d129-4ca9-8999-ed54910b824d","www.fomain.com//test.html","test","\/Date(1316189236173)\/",25],["82d62b61-d96b-489a-ae91-008b897db553","97.74.67.146/testx.html?xx=x","test","\/Date(1316256259490)\/",11],["97aaf346-1146-429e-bc5a-fcfa4b2d934b","97.74.67.146/testx.html","test","\/Date(1316255702510)\/",4],["2fea1222-e254-4db9-a68e-5129a0d87e8e","97.74.67.146/qn_news_story_s.asp?storyid=1093442005","Oman invests USD3.8b in constructing dry dock","\/Date(1316188504010)\/",2],["82fe900d-eefe-4540-87a4-1fe6057234a7","http://www.menafn.com/qn_news_story.asp?StoryId={83510500-a24b-4f87-9bf1-3985134ee4b6}","Title 1","\/Date(1315411910897)\/",1]]} 

Open in new window

0
Comment
Question by:Sindibad_123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 82

Accepted Solution

by:
leakim971 earned 2000 total points
ID: 36562864
you need to remove the first accolade : {
{"Columns":["id","Article_Url","Article_Title","Date","num"],"Rows":[["5bb93b83-d129-4ca9-8999-ed54910b824d","www.fomain.com//test.html","test","\/Date(1316189236173)\/",25],["82d62b61-d96b-489a-ae91-008b897db553","97.74.67.146/testx.html?xx=x","test","\/Date(1316256259490)\/",11],["97aaf346-1146-429e-bc5a-fcfa4b2d934b","97.74.67.146/testx.html","test","\/Date(1316255702510)\/",4],["2fea1222-e254-4db9-a68e-5129a0d87e8e","97.74.67.146/qn_news_story_s.asp?storyid=1093442005","Oman invests USD3.8b in constructing dry dock","\/Date(1316188504010)\/",2],["82fe900d-eefe-4540-87a4-1fe6057234a7","http://www.menafn.com/qn_news_story.asp?StoryId={83510500-a24b-4f87-9bf1-3985134ee4b6}","Title 1","\/Date(1315411910897)\/",1]]} 

Open in new window


else use :
    $.each(json["Rows"], function(i,el) {
        $("#here").append("<a href=\"" + el[1] + "\">" + el[2] + "</a><br />");  
    })

TEST PAGE : http://jsfiddle.net/DxHQr/
0

Featured Post

7 Extremely Useful Linux Commands for Beginners

Just getting started with Linux? Here's a quick start guide that has 7 commands that we believe will come in handy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question