Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6580091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:58:54+00:00 2026-05-25T15:58:54+00:00

I am new to JSON How can I display the following data to the

  • 0

I am new to JSON

How can I display the following data to the html. for sample I want to display the ‘lat’ and ‘lng’ from the ‘southwest’ or I want to display the ‘text’.

{ “routes” : [
{
“bounds” : {
“northeast” : {
“lat” : -26.758340,
“lng” : 153.035930
},
“southwest” : {
“lat” : -27.454070,
“lng” : 152.852150
}
},
“copyrights” : “Map data ©2011 GBRMPA, Google, Whereis(R),
Sensis Pty Ltd”,
“legs” : [
{
“distance” : {
“text” : “89.7 km”,
“value” : 89693
},
“duration” : {
“text” : “1 hour 17 mins”,
“value” : 4633
},
“end_address” : “Maleny QLD 4552, Australia”,
“end_location” : {
“lat” : -26.758420,
“lng” : 152.852150
},
“start_address” : “Brisbane QLD, Australia”,
“start_location” : {
“lat” : -27.454070,
“lng” : 153.026880
},
}
],
}
] }

Cheers!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T15:58:55+00:00Added an answer on May 25, 2026 at 3:58 pm

    As Georgi said, use $.parseJSON(data).

    Then, to access the lat and lng properties, you can use the dot notation:

    var data = ''; // json string here
    var jsonObject = $.parseJSON(data);
    var lat = jsonObject.routes[0].bounds.northeast.lat;
    var lng = jsonObject.routes[0].bounds.northeast.lng;
    

    Because routes is an array object, we use the regular array element accessor ([]) to access the first element (0).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im new to JSON and php. I need to grab the lat and lng
I am getting JSON data from a web service and would like to display
Am new to EXTJS. Can anyone explain me the relation between EXTJS and JSON
I have: localStorage.xxx = JSON.stringify([[something,hello],[something2,hello2]]); . How can i add a new array in
i am adding images and data obtained from webservice(json response) in listview. Some times
I got this servlet which creates JSON data and I want to pass this
I am using Listview to display image and data using json parser, But when
My application is getting a datetime value from JSON in the following format: Created
I have a problem where I need to display json data on a jqgrid.
How can i remove the key's with null values and form a new json.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.