I'm working on a javascript program that needs to get data from an API.
My problem is I'm not able to go from the url string to the actual JSON data.
I've looked here and they provide this answer :
Put your JSON string a variable var jsonString
then...
var myJsonObject = JSON.parse(jsonString);
So I ended up with :
var url = "https://pixabay.com/api/?";
var data = JSON.parse(url);
But this is not working. I'm sure I'm missing something obvious but I can't see what.
Any help would be greatly appreciated, thanks !