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

  • Home
  • SEARCH
  • 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 8549179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:40:00+00:00 2026-06-11T13:40:00+00:00

I want to parse the Weather API (URL) city name, temperature, etc. My JSON

  • 0

I want to parse the Weather API (URL) city name, temperature, etc.

My JSON data is the following:

{
    "data": {
        "current_condition": [{
            "cloudcover": "25",
            "humidity": "70",
            "observation_time": "04:21 PM",
            "precipMM": "0.3",
            "pressure": "1007",
            "temp_C": "30",
            "temp_F": "86",
            "visibility": "4",
            "weatherCode": "113",
            "weatherDesc": [{
                "value": "Clear"}],
            "weatherIconUrl": [{
                "value": "http:\/\/www.worldweatheronline.com\/images\/wsymbols01_png_64\/wsymbol_0008_clear_sky_night.png"}],
            "winddir16Point": "S",
            "winddirDegree": "180",
            "windspeedKmph": "7",
            "windspeedMiles": "4"}],
        "request": [{
            "query": "Ahmedabad, India",
            "type": "City"}],
        "weather": [{
            "date": "2012-09-18",
            "precipMM": "2.1",
            "tempMaxC": "32",
            "tempMaxF": "89",
            "tempMinC": "25",
            "tempMinF": "76",
            "weatherCode": "176",
            "weatherDesc": [{
                "value": "Patchy rain nearby"}],
            "weatherIconUrl": [{
                "value": "http:\/\/www.worldweatheronline.com\/images\/wsymbols01_png_64\/wsymbol_0009_light_rain_showers.png"}],
            "winddir16Point": "SSW",
            "winddirDegree": "203",
            "winddirection": "SSW",
            "windspeedKmph": "12",
            "windspeedMiles": "8"},
        {
            "date": "2012-09-19",
            "precipMM": "3.4",
            "tempMaxC": "32",
            "tempMaxF": "89",
            "tempMinC": "25",
            "tempMinF": "76",
            "weatherCode": "176",
            "weatherDesc": [{
                "value": "Patchy rain nearby"}],
            "weatherIconUrl": [{
                "value": "http:\/\/www.worldweatheronline.com\/images\/wsymbols01_png_64\/wsymbol_0009_light_rain_showers.png"}],
            "winddir16Point": "SW",
            "winddirDegree": "223",
            "winddirection": "SW",
            "windspeedKmph": "12",
            "windspeedMiles": "7"}]
    }
}​

How do I parse this data and get city name and temperature..I have no idea..Thanks in adavance.

=============== OutPut =======================

i want to fetch data like this and Set on Textbox

Date        2012-09-18    2012-09-19

tempMaxC    32               32
tempMinC    25               25

tempMaxF    89               89
tempMinF    76               76
  • 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-06-11T13:40:02+00:00Added an answer on June 11, 2026 at 1:40 pm

    If you’ve retrieved this JSON as a string, then pass this string to JSON.parse()* and then access to retrieved value as to a regular JavaScript object:

    var jsonStr = '{ "data": { "current_condition": [ {"cloudcover": "25", "humidity": "70", "observation_time": "04:21 PM", "precipMM": "0.3", "pressure": "1007", "temp_C": "30", "temp_F": "86", "visibility": "4", "weatherCode": "113",  "weatherDesc": [ {"value": "Clear" } ],  "weatherIconUrl": [ {"value": "http:\/\/www.worldweatheronline.com\/images\/wsymbols01_png_64\/wsymbol_0008_clear_sky_night.png" } ], "winddir16Point": "S", "winddirDegree": "180", "windspeedKmph": "7", "windspeedMiles": "4" } ],  "request": [ {"query": "Ahmedabad, India", "type": "City" } ],  "weather": [ {"date": "2012-09-18", "precipMM": "2.1", "tempMaxC": "32", "tempMaxF": "89", "tempMinC": "25", "tempMinF": "76", "weatherCode": "176",  "weatherDesc": [ {"value": "Patchy rain nearby" } ],  "weatherIconUrl": [ {"value": "http:\/\/www.worldweatheronline.com\/images\/wsymbols01_png_64\/wsymbol_0009_light_rain_showers.png" } ], "winddir16Point": "SSW", "winddirDegree": "203", "winddirection": "SSW", "windspeedKmph": "12", "windspeedMiles": "8" }, {"date": "2012-09-19", "precipMM": "3.4", "tempMaxC": "32", "tempMaxF": "89", "tempMinC": "25", "tempMinF": "76", "weatherCode": "176",  "weatherDesc": [ {"value": "Patchy rain nearby" } ],  "weatherIconUrl": [ {"value": "http:\/\/www.worldweatheronline.com\/images\/wsymbols01_png_64\/wsymbol_0009_light_rain_showers.png" } ], "winddir16Point": "SW", "winddirDegree": "223", "winddirection": "SW", "windspeedKmph": "12", "windspeedMiles": "7" } ] }}',
        jsonObj = JSON.parse(jsonStr);
        console.log(jsonObj.data.current_condition[0].temp_F);
    

    Otherwise, if you’ve retrieved this JSON e.g. as a parameter of some jQuery $.ajax() success callback and it’s already an object, you don’t need to call JSON.parse(), but just retrieve object’s values directly:

    $.getJSON("http://example.com/weather.json", function(jsonObj) {
        // The response string is already parsed with $.parseJSON(),
        // so you don't need to parse it yourself.
        // Therefore just go ahead and access the properties of JavaScript object.
        console.log(jsonObj.data.current_condition[0].temp_F);
    });
    

    * If you’re intended to support older browsers (e.g. IE7) that does not support JSON.parse/stringify, you’ll need to include JSON library.

    UPDATE:

    DEMO for particular case

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

Sidebar

Related Questions

I want to parse the Yahoo! Weather API and I want to save these
i want to parse google weather API using NSXML so please give me some
I want to parse a JSON file in java and get the following values
I want show weather information from xml to this URL: http://www.google.com/ig/api?weather=roma&hl=it using this script:
I want to parse the data from a json and replace them in a
I want to parse a json data into a java object, then post it
I want to parse the following xml and get the value of metadata:description using
I want to parse a JSON object and create a JSONEvent with the given
I want to parse the following html code for my iphone application <Html> <body>
I want to parse the JSON string below into an associative array, sort it

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.