Since i'm getting answers not related to what i'm trying to achieve I'll just make it as simple as i can.
Multiple separate jsons in the same format each containing the information of individual locations.
All i want powershell to do is take this:
{
"Description": {
"Id": "town_breezeholme",
"Name": "Breezeholme",
"Blurb": "This quiet town on the outskirts has prospered almost
completely independently from the surrounding civilisation for nearly 200 years
due to it's vast wealth accumulated from rich, fertile farmlands, rivers and
shipping ports.",
"Authority": "Jeraxian Warriors",
},
"coords": {
"x": 66.4,
"y": -418.2,
"z": 34
},
"tags": {
"items": [
"store_jewelers",
"store_bank",
"store_general_goods",
"store_post_office",
"climate_sub_tropical"
]},
and turn it into this:
var town_breezeholme = L.marker(map.unproject([,], map.getMaxZoom()))
.bindPopup(`<h1>Breezeholme</h1><p>This quiet town on the outskirts hasprospered almost completely independently from the surrounding civilisation for nearly 200 years due to it's vast wealth accumulated from rich, fertile farmlands, rivers and shipping ports.</p> \n
<p>Climate: Sub Tropical \n
<p>Stores: Jewelers, Bank, General Goods, Post Office \n
<p>Authority: Jeraxian Warriors `);
but a few hundred times for each one. all i want is something i can copy and paste into my existing html file so that i dont have to write the above out for every single location myself.
You can ignore the coords, i dont want that info and i dont need the marker arrays, i will put the marker arrays in myself as they the coords will not be the same as the marker arrays.
axios.get('jsonfiles/file1.json').then(function(response){ var town_XXtown_name = L.marker(map.unproject([response.data.coords.x, response.data.coords.u], map.getMaxZoom())).bindPopup(`<h1>${response.data.Description.Name}</h1>`);(Not complete, but I think you get the picture.) '` jQuery has a [.get()] as well if that is more familiar. Same thing (jquery does 1000 of things, axios only does the ajax requests).