I'm trying to retrieve and parse some simple JSON from a url. This is what works so far for me (although I'm not sure if ofLoadURL is what I should be using - there seem to be many ways to retrieve content from a url):

ofelia f;
resp = ofLoadURL("https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY&date=2024-06-06");
text = resp.data:getText();

I can output it as text but cannot understand how to parse it from buffer or the string to JSON. I've been using this as an example (https://stackoverflow.com/questions/4800605/iterating-through-objects-in-jsoncpp) so just to get one entry from the JSON should it be something like this? - not sure how to change it to work in Ofelia:

Json::Value root;
Json::Reader parser;

// Parse the json (using the text in the code above)
parser.parse( text, root );

// Get the url