Please help me decode this nested json array objects

17 views
Skip to first unread message

Jitesh Sinha

unread,
Jun 5, 2013, 3:20:57 AM6/5/13
to xamp...@googlegroups.com
{
   
"data": {
       
"current_condition": [{
           
"cloudcover": "25",
           
"humidity": "22",
           
"observation_time": "06:55 AM",
           
"precipMM": "0.0",
           
"pressure": "1002",
           
"temp_C": "41",
           
"temp_F": "106",
           
"visibility": "3",
           
"weatherCode": "113",
           
"weatherDesc": [{
               
"value": "Sunny"
           
}],
           
"weatherIconUrl": [{
               
"value": "http:\/\/www.worldweatheronline.com\/images\/wsymbols01_png_64\/wsymbol_0001_sunny.png"
           
}],
           
"winddir16Point": "W",
           
"winddirDegree": "260",
           
"windspeedKmph": "9",
           
"windspeedMiles": "6"
       
}],
       
"request": [{
           
"query": "New Delhi, India",
           
"type": "City"
       
}],
       
"weather": [{
           
"date": "2013-06-05",
           
"precipMM": "0.0",
           
"tempMaxC": "49",
           
"tempMaxF": "119",
           
"tempMinC": "39",
           
"tempMinF": "102",
           
"weatherCode": "113",
           
"weatherDesc": [{
               
"value": "Sunny"
           
}],
           
"weatherIconUrl": [{
               
"value": "http:\/\/www.worldweatheronline.com\/images\/wsymbols01_png_64\/wsymbol_0001_sunny.png"
           
}],
           
"winddir16Point": "WNW",
           
"winddirDegree": "290",
           
"winddirection": "WNW",
           
"windspeedKmph": "16",
           
"windspeedMiles": "10"
       
}, {
           
"date": "2013-06-06",
           
"precipMM": "0.0",
           
"tempMaxC": "48",
           
"tempMaxF": "118",
           
"tempMinC": "39",
           
"tempMinF": "101",
           
"weatherCode": "113",
           
"weatherDesc": [{
               
"value": "Sunny"
           
}],
           
"weatherIconUrl": [{
               
"value": "http:\/\/www.worldweatheronline.com\/images\/wsymbols01_png_64\/wsymbol_0001_sunny.png"
           
}],
           
"winddir16Point": "WNW",
           
"winddirDegree": "289",
           
"winddirection": "WNW",
           
"windspeedKmph": "22",
           
"windspeedMiles": "14"
       
}, {
           
"date": "2013-06-07",
           
"precipMM": "0.0",
           
"tempMaxC": "48",
           
"tempMaxF": "119",
           
"tempMinC": "38",
           
"tempMinF": "100",
           
"weatherCode": "113",
           
"weatherDesc": [{
               
"value": "Sunny"
           
}],
           
"weatherIconUrl": [{
               
"value": "http:\/\/www.worldweatheronline.com\/images\/wsymbols01_png_64\/wsymbol_0001_sunny.png"
           
}],
           
"winddir16Point": "W",
           
"winddirDegree": "276",
           
"winddirection": "W",
           
"windspeedKmph": "20",
           
"windspeedMiles": "12"
       
}, {
           
"date": "2013-06-08",
           
"precipMM": "0.0",
           
"tempMaxC": "49",
           
"tempMaxF": "121",
           
"tempMinC": "38",
           
"tempMinF": "101",
           
"weatherCode": "113",
           
"weatherDesc": [{
               
"value": "Sunny"
           
}],
           
"weatherIconUrl": [{
               
"value": "http:\/\/www.worldweatheronline.com\/images\/wsymbols01_png_64\/wsymbol_0001_sunny.png"
           
}],
           
"winddir16Point": "NW",
           
"winddirDegree": "312",
           
"winddirection": "NW",
           
"windspeedKmph": "19",
           
"windspeedMiles": "12"
       
}, {
           
"date": "2013-06-09",
           
"precipMM": "0.0",
           
"tempMaxC": "47",
           
"tempMaxF": "117",
           
"tempMinC": "38",
           
"tempMinF": "100",
           
"weatherCode": "113",
           
"weatherDesc": [{
               
"value": "Sunny"
           
}],
           
"weatherIconUrl": [{
               
"value": "http:\/\/www.worldweatheronline.com\/images\/wsymbols01_png_64\/wsymbol_0001_sunny.png"
           
}],
           
"winddir16Point": "WNW",
           
"winddirDegree": "294",
           
"winddirection": "WNW",
           
"windspeedKmph": "22",
           
"windspeedMiles": "13"
       
}]
   
}
}

PRASANT KUMAR SUMAN

unread,
Jun 5, 2013, 3:43:25 AM6/5/13
to xamp...@googlegroups.com
HI,

You can use this link to format the json into a tree like structure which would be easier to understand

ℙґα﹩@η☂ Ḳüღαґ $üмαη


--
Create filter of mails from this group http://www.wikihow.com/Create-a-Filter-in-Gmail
Manage your settings from http://groups.google.com/groups/mysubs?pli=1
---
You received this message because you are subscribed to the Google Groups "PHP Developers' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xamppdev+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

vikas dwivedi

unread,
Jun 5, 2013, 3:43:56 AM6/5/13
to xamp...@googlegroups.com
use 

json_decode($json ,true);

regards !
vikas dwivedi 


On Wed, Jun 5, 2013 at 12:50 PM, Jitesh Sinha <jiteshs...@gmail.com> wrote:

{


--

Siva prabu

unread,
Jun 5, 2013, 3:54:32 AM6/5/13
to xamp...@googlegroups.com
What is the purpose of USing JSON in PHP?

 regards,

| Sivaprabu. G | Ph No: +91-9940-111-413 | Web Developer

| Follow Me: Facebook Twitter Facebook Page|

vikas dwivedi

unread,
Jun 5, 2013, 4:42:00 AM6/5/13
to xamp...@googlegroups.com
Json is used to fulfil XHR operation.


regards !
vikas dwivedi 
Reply all
Reply to author
Forward
0 new messages