M
M
myskypesla2017-04-29 22:13:02
JavaScript
myskypesla, 2017-04-29 22:13:02

How to access an object in json?

Tell me how to reach countOf ?

I can't do it like this: var countOf = accessToServer.data.statstics.all.countOf

{
    "data": {
        "2067983": {
            "statistics": {
                "all": {
                    "countOf": 10
                }
            }
        }
    }
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Sosnovsky, 2017-04-29
@desiigner

so you have the same statistics object in 2067983, and therefore does not find data.statstics.all.countOf

Q
Q2W, 2017-04-30
@Q2W

доступКсерверу.data['2067983'].statistics.all.countOf

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question