Improve company productivity with a Business Account.Sign Up

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 272
  • Last Modified:

JSON parsing using javascript

Hello Sir,

Could you please help me to parse this Json response.

  How can I parse this JSON response using JavaScript for getting title, description, siteHost and Clickurl.

   "bossresponse": {
      "responsecode": "200",
           "ads": {
                "resultset": {
                    "id": "adListings",
                    "numResults": "1",
                        "listing": [
                                "rank": "1",
                                "title": "<b>Football</b> Equipment",
                                "description": "Large selection of <b>football</b> equipment and training aids",
                                "siteHost": "",
                                "clickurl": ""
1 Solution
I think this should work... (JSONRespText contains the response above)

var myObj = eval('(' + JSONRespText + ')');
var listings =;
var rank = listings[0].rank;
var title = listings[0].title;
var desc = listings[0].description;
var siteHost = listings[0].siteHost;
var clickurl = listings[0].clickurl;

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now