Answer the question
In order to leave comments, you need to log in
How to pull the Json index of an array by its ordinal?
How to find the Json index of an array by its ordinal?
I have an array of format:
array(10) {
[2056]=>
array(1) {
["id"]=>
string(2) "3"
[2096]=>
array(7) {
["id"]=>
string(2) "7"
Answer the question
In order to leave comments, you need to log in
Have you tried for in?
for (var key in { 2001: {}, 2002: {} }) {
console.log(key);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question