Answer the question
In order to leave comments, you need to log in
How to read this array?
In general, I have an array that I can’t read in any way
[{"534565478423434":{coins:100},"364763211246686":{coins:77},"4354243024667":{coins:26}}]
[object Object] undefined
Answer the question
In order to leave comments, you need to log in
such a structure is called an 'array of objects'.
an array element can be obtained by its index []
, an object element - by the name of the key [key]
.
in your case, the index of the object in the array is 0, we get it like this:
further, we just work with the object itself -
arr[0]
arr[0][key].property
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question