Help with processing data from JSON

I have the data that I get from firebase.

{
    "plyers": {
        "plyer1": {
            "name": {
                "citys": {
                    "city1": {
                        "name": "hello"
                    },
                    "city2": {
                        "name": "red"
                    }
                }
            }
        },
        "plyer2": {
            "name": {
                "citys": {
                    "city1": {
                        "name": "gray"
                    }
                }
            }
        }
    }
}

I wrote something like this for testing.

I am able to get the data.

And here I can’t figure out how to process the data. I’ve tried every possible extension. Because my data contains lists, the extensions fail. Or I can’t figure out exactly how to use them, for example, to get the list under players. I would appreciate any help possible.

What are the details you are expecting to get? Under player many tags are there? So pls give more specific.

Hi sadlol,

@Still-learning I think he means this,

With this, you get the name of city1

1 Like

Well, if you want only players name the try this

If you want further players details then need to redesign the code

1 Like