I want something along the lines of array1.length
from the below array:
var array1 = {
sub1: [1,2,3],
sub2: ["K","J","H"],
sub3: ["Mango","Armada","Leffen","Mew2king"],
sub4: ['1/8"', '3/16"', '1/4"'],
};
Right now I'm getting the following outputs:
console.log(array1) //Object {sub1: Array[3], sub2: Array[3]...}
console.log(array1.length) //undefined
console.log(array1[1]) //undefined
console.log(array1[1].length //Cannot read property 'length' of undefined
Where am I going wrong?