Cheers Dan that works brilliantly.
I was trying to use it in conjunction with referencing my Json file…Someone from IT had pointed out that you can title your keys. So they don’t have to be [0] or [1], you can give them values.
So this works better than what I wanted to use it for. I’ve just posted it up as I could not find anything mentioning about labelling Json’s like this. So I think it’s worth sharing.
{
“bristol”:{
“city”:”BRISTOL”,
“condition1″:”Partly Cloudy”,
“condition2″:”Partly Cloudy”,
“condition3″:”Partly Cloudy”,
“condition4″:”Partly Cloudy”,
“condition5″:”Partly Cloudy”,
“condition6″:”Partly Cloudy”,
“maxtemp1”:6,
“maxtemp2”:8,
“maxtemp3”:8,
“maxtemp4”:8,
“maxtemp5”:8,
“maxtemp6”:8,
“windspeed1”:20,
“windspeed2”:20,
“direction1”:131,
“direction2”:131
},
“bath”:{
“city”:”BATH”,
“condition1″:”Heavy Rain”,
“maxtemp1”:4,
“maxtemp2”:8,
“windspeed1”:20,
“windspeed2”:20,
“direction1”:131,
“direction2”:131
}
}