Try to search your question here, if you can't find : Ask Any Question Now ?

How do i access an array within an array

HomeCategory: stackoverflowHow do i access an array within an array
Avatarpragati asked 3 weeks ago

I have an associative array that has the following structure: an associative array that contains a field called id and another called data. In the id there will be a value, and in the data one another associative array will be stored.

array1 = []
array2 = []

for (var i = 0; i < 4; i ++) {
      array2 [i] = {number1: 31, number2: 29, number3: 31}
      array1 [i] = {id: i, data: array2 [i]}
}

How do I access the “number1” of index 0, of array1?

1 Answers
Best Answer
AvatarAmit answered 3 weeks ago
Your Answer

17 + 6 =

Popular Tags

WP Facebook Auto Publish Powered By : XYZScripts.com