Im wondering how I can grab and then display in my html file(using pure Javascript) the following objects found in the below JSON file? I specifically need to grab the following 3 objects and display each instance of each.. "barTitle," "id," and show all "OpenTimes."
Please note, I do have this file already uploaded to a webserver(http://codepupil.com/js/bar.json).
onBarLocationsLoaded({
"results":[
{
"barCity":"Annapolis",
"barState":"MD",
"barZip":"21401",
"recordingPhone":"410-213-1145",
"distance":"2.10",
"longitude":-725464,
"latitude":489914,
"barLong":-725464,
"barLat":489914,
"barLink":"http:\/\/www.bar.com\/bar\/bow-tie",
"barName":"Bow Tie Bar",
"movie":[
{
"barTitle":"Bar Louie",
"Id":"20057095",
"openTimes":[
{
"time":"12:00pm"
},
{
"time":"3:40pm"
},
{
"time":"6:40pm"
}
]
},
{
"barTitle":"Bar Louise",
"Id":"20057095",
"openTimes":[
{
"time":"12:00pm"
},
{
"time":"3:40pm"
},
{
"time":"6:40pm"
}
]
},
{
"barTitle":"Bar Louie",
"Id":"20057095",
"openTimes":[
{
"time":"12:00pm"
},
{
"time":"3:40pm"
},
{
"time":"6:40pm"
}
]
},
{
"barTitle":"Bar Capo",
"Id":"20057095",
"openTimes":[
{
"time":"12:00pm"
},
{
"time":"3:40pm"
},
{
"time":"6:40pm"
}
]
},
{
"barTitle":"Bar Boo Boo",
"Id":"20057095",
"openTimes":[
{
"time":"12:00pm"
},
{
"time":"3:40pm"
},
{
"time":"6:40pm"
}
]
},
}
]
});