I am currently struggling with the issue of reading in a JSON file with javascript.
I am not entirely sure if this is the correct format for a JSON file with arrays, but here is my JSON file.
[
{
"passageNumber":"2.3.1",
"title":"Inside and out: A bronze Athena and a Temple of Octavia",
"preReading":"This paragraph appears to refer to what the excavators named Temple E...",
"reading":"<span>Lorem</span> ipsum <span>dolor</span> sit amet, consectetur",
"media":"<img src='img/TempleE-capital.jpg'>",
"lon":"41.925",
"lat":"-91.426"
},
{
"passageNumber":"2.3.2",
"title":"The Road to Lechaeum",
"preReading":"<a href='http://google.com'>yipppie",
"postReading":"",
"reading":"blahhhhhhhhhhhhhhhhhh.",
"media":"<img src='img/templE-brick.jpg'>",
"lon":"41.625",
"lat":"-91.672"
}
]
I ultimately would like to be able to read the JSON file (most likely with JQuery), and then select all of the information given a passage number.
Any help would be amazing.
Thank you!
EDIT
I am pulling this from an external JSON file. It needs to load in the JSON file.