Select to view content in your preferred language

Correct root property path for input JSON

128
2
Jump to solution
4 weeks ago
AlexLeonovDataPlusInt
New Contributor

Please help to set correct root property path for input JSON https://monitoring.meteo.uz/en/api/maps

Without root property the connection tool returning one record

AlexLeonovDataPlusInt_0-1720186437715.png

While I’m trying to use root property path statements like .data [ ] or .data [ ]. stations [ ] tool is returning error

AlexLeonovDataPlusInt_1-1720186476820.png

 

The example of JSON:

 

 

 

{
  "data": [
    {
      "stations": [
        {
          "id": "727",
          "lon": "69.35755556",
          "lat": "41.05352778",
          "Si": "Авто",
          "date": "22.03.2024",
          "color": "#8c2b8c",
          "category_title": "a:4:{s:2:\"ru\";s:16:\"Нурафшон\";s:2:\"uz\";s:16:\"Нурафшон\";s:2:\"oz\";s:16:\"Нурафшон\";s:2:\"en\";s:16:\"Нурафшон\";}",
          "title": "a:4:{s:2:\"ru\";s:114:\"Автоматическая станция мониторинга атмосферного воздуха (Beta) \";s:2:\"uz\";s:114:\"Автоматическая станция мониторинга атмосферного воздуха (Beta) \";s:2:\"oz\";s:114:\"Автоматическая станция мониторинга атмосферного воздуха (Beta) \";s:2:\"en\";s:114:\"Автоматическая станция мониторинга атмосферного воздуха (Beta) \";}",
          "alias": "avtomaticheskaja-stantsija-monitoringa-atmosfernogo-vozduha-beta-",
          "region_id": "1727",
          "NO": "",
          "SO2": "",
          "CO": "",
          "NO2": "",
          "NH3": "",
          "O3": "",
          "C6H6O": "",
          "substances": "",
          "unserialize_category_title": {
            "ru": "Нурафшон",
            "uz": "Нурафшон",
            "oz": "Нурафшон",
            "en": "Нурафшон"
          }
        },
        {
          "id": "3",
          "lon": "69.592419",
          "lat": "40.856275",
          "Si": "3.09",
          "date": "05.07.2024",
          "color": "#38cf71",
          "category_title": "a:4:{s:2:\"ru\";s:82:\"ул. Амира Тимура (ориентир: Кафе «Боги шамол»)\";s:2:\"uz\";s:76:\"Амир Тимур к. (мўлжал: «Боғи шамол» кафеси)\";s:2:\"oz\";s:0:\"\";s:2:\"en\";s:57:\"Amir Timur St. (reference point: “Bogi Shamol” café)\";}",
          "title": "a:4:{s:2:\"ru\";s:28:\"ПНЗ №1 - Алмалык\";s:2:\"uz\";s:28:\"ИКП №1 - Олмалиқ\";s:2:\"oz\";s:0:\"\";s:2:\"en\";s:22:\"РОР №1 - Almalyk \";}",
          "alias": "pnz-1-almalyk",
          "region_id": "1727",
          "NO": "0,03",
          "SO2": "0,078",
          "CO": "",
          "NO2": "0,05",
          "NH3": "0,03",
          "O3": "",
          "C6H6O": "",
          "substances": "",
          "unserialize_category_title": {
            "ru": "ул. Амира Тимура (ориентир: Кафе «Боги шамол»)",
            "uz": "Амир Тимур к. (мўлжал: «Боғи шамол» кафеси)",
            "oz": "",
            "en": "Amir Timur St. (reference point: “Bogi Shamol” café)"
          }
        }
      ]
    }
  ]
}

 

 

 

Thanks!

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
MaxPayson
Esri Contributor

Hi, thanks for the question!

To get at this data, use "data" as the root property, then add two Unnest tools to flatten out the fields. The root property currently does not support accessing array entries (for example, "data[1]").

Here's a screenshot:

Screenshot 2024-07-06 at 6.32.46 PM.png

View solution in original post

2 Replies
MaxPayson
Esri Contributor

Hi, thanks for the question!

To get at this data, use "data" as the root property, then add two Unnest tools to flatten out the fields. The root property currently does not support accessing array entries (for example, "data[1]").

Here's a screenshot:

Screenshot 2024-07-06 at 6.32.46 PM.png

AlexLeonovDataPlusInt
New Contributor

Max, thank you very much! It's working beautifully!