A simple question here: I have the following subset of my data in Javascript. My application works, but I need a simple way to bring in an expanded version of that same data, but taken from an Excel file rather than manually entered into this script. What is the simplest and easiest solution to do so with few steps in between?
const countryData={
australia: {
countryName: "France",
fsnNarrative: "aus fsn lorem ipsum dolor sit amet",
otherNarrative: "lorem ipsum dolor",
marketLink: "http://www.google.com",
center: [65, 34],
zoom:4
},
france: {
countryName: "France",
fsnNarrative: "bgd fsn lorem ipsum dolor sit amet",
otherNarrative: "lorem ipsum dolor",
marketLink: "http://www.youtube.com",
center: [90, 24],
zoom: 5
}
}
I tried to convert it in from a JSON, but had trouble also a) converting excel to JSON and b) assigning external local JSON to a constant (trying to follow this guidance but am not clear. I also use R, in case anyone has a solution with that.
Optimally, I'd be able to just link from the Javascript to an external JSON or some other file type, like this. const data = (path to some URL)
Working with just Javascript, HTML and CSS for now.