У меня есть следующий запрос JSON (только его фрагмент), и я пытаюсь проанализировать температуруHigh в данных [{}].Я не могу понять, как разобрать массив объектов внутри объекта.Я использую Qt.
{
"latitude":xxx,
“longitude":xxx,
“timezone":"America/New_York",
“currently":{
"time":1552765335,
“summary":"Clear",
“icon":"clear-day",
“nearestStormDistance":4,
“nearestStormBearing":268,
“precipIntensity":0,
“precipProbability":0,
“temperature":48.32,
“apparentTemperature":43.25,
“dewPoint":20.91,
“humidity":0.33,
“pressure":1014.29,
“windSpeed":12.22,
“windGust":20.11,
“windBearing":310,
“cloudCover":0.04,
“uvIndex":3,
“visibility":9.64,
“ozone":317.85
},
“daily":{
"summary":"No precipitation throughout the week, with high temperatures falling to 43°F on Tuesday.",
“icon":"clear-day",
“data":[{
"time":1552708800,
“summary":"Partly cloudy until afternoon.",
“icon":"partly-cloudy-day",
“sunriseTime":1552734266,
“sunsetTime":1552777293,
“moonPhase":0.34,
“precipIntensity":0.0007,
“precipIntensityMax":0.0101,
“precipIntensityMaxTime":1552708800,
“precipProbability":0.35,
“precipType":"rain",
“temperatureHigh":48.89,
“temperatureHighTime":1552759200,
“temperatureLow":31.84,
“temperatureLowTime":1552820400,
“apparentTemperatureHigh":43.85,
“apparentTemperatureHighTime":1552762800,
“apparentTemperatureLow":22.64,
“apparentTemperatureLowTime":1552820400,
“dewPoint":29.06,
“humidity":0.52,
Пока это то, что у меня есть
QJsonParseError jError;
QJsonDocument test = QJsonDocument::fromJson(data, &jError);
QVariantMap qVar1 = jObj.value("daily").toVariant().toMap();