I have a url https://blah/configs.ini
It basically looks like this:
[cdmglobal]
collectionHomepageImage = "upload"
customLandingPageAltText = ""
customLandingPageImage = "images/landingpage/small-monographiiif2.jpg
...
...
I need the name of that customLandingPageImage. My plan was to put it into a string and then grab the bit after '/images/landingpage' until I get to '.jpg'
I've tried this
let newSource = "http://blah/configs.ini";
fetch(newSource)
.then(function(response) {
let responseString = response.text();
console.log(responseString);
}).catch(function() {
console.log("error");
});
Now in Chrome dev tools, it shows me:
Promise
__proto__: Promise
[[PromiseStatus]]: "resolved"
[[PromiseValue]]: "[cdmglobal]↵collectionHomepageImage = "upload"↵customLandingPageAltText = ""↵customLandingPageImage = "images/landingpage/small-monographiiif2.jpg
I really just want that promiseValue but it only returns it in the form of a promise value, not a string.