Getting error "not a well formed list of pairs"

I am getting this error while trying to get some data from an API. How can I not get this error?


Error is caused because list is an array. You can work with dictionary blocks
json response for example

{
    "coord": {
        "lon": 50,
        "lat": 50
    },
    "list": [
        {
            "main": {
                "aqi": 2
            },
            "components": {
                "co": 267.03,
                "no": 0,
                "no2": 0.35,
                "o3": 90.12,
                "so2": 1.42,
                "pm2_5": 4.04,
                "pm10": 4.04,
                "nh3": 0.23
            },
            "dt": 1647370800
        }
    ]
}

Blocks example

3 Likes

Thank you so much for this solution.How can I only get 2 instead of [2]?

Simply use select item list index 1

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.