Sorry, total noob here, working on an arduino project.
It ends up getting a weather service, however, the example code i have only gets the weather, i'd like to get the temperature too.
So instead of making 2 requests, i'd like to return an object, and parse it from there.
So, how do i make an object like:
{"weather":"Sunny","temperature":"22"}
from this:
void onSuccess(HttpResponse & response)
{
/* Using the response to query the Json chain till the required value. */
/* i.e. Get the value of 'main' in the first object of the array 'weather' in the response. */
/* Providing that the response is in JSON format. */
response["weather"][0]["main"].query();
}
Edit: Definition of HTTP class:
HttpRequest request("http://api.openweathermap.org/data/2.5/weather?q=skopje");