Pulling Data From An Object Using A Loop

lets say I have


alpha.numeric.1.array
alpha.numeric.2.array
alpha.numeric.3.array

how would i go about getting the data in the array?

my current thinking is


for(index=0;index<=3;index++;)
{
alpha.numeric[index].arraykey;
}

but that’s not working.

Does alpha exist? If not you will need to assign an object to it.
Does numeric exist? If not you will need to assign an array to it.

Both alpha and numeric exist.

I know for certain that the data is all there, I just don’t know how to cycle through it.

You should just be able to do this to access the numeric array referenced by the index value:

numericArray = alpha.numeric[index]

I’m now trying

alpha.numeric.forEach = function() {
// do everything I want

} 

But how do I access the array inside of the loop?

By using a function parameter.

Be warned with using foreach, it’s only suitable for objects in which you can be sure of their contents. The foreach method can have unexpected results on arrays.