I just started playing around with JSON and I have created this example.
var shows = {
"ShowA":
{ "Date" : "November 3-5, 2011",
"Phone" : "111-111-1111",
"Location" : "some location",
"url" : "http://www.showA.com"
},
"ShowB":
{ "Date" : "January 15-18, 2012",
"Phone" : "222-222-2222",
"Location" : "another location",
"url" : "http://www.showB.com"
}
};
I figured out how to access each bit of information...ie: alert(shows.ShowA.Date);
However, I can't figure out how to loop the entire shows object in order alert each show and each show's properties. Do I need to change it to an array?
Any help would be greatly appreciated.