I have an array as follows in nodejs
var dataary=[];
dataary=[ [ 'reg_no', 'slno', 'name', 'email', 'rollno' ],
[ 'int', 'int', 'varchar', 'varchar', 'int' ],
[ '100', '11', '255', '255', '100' ] ]
I need the count of array elements.As i do dataary.length it will return 3. But i need the count as 5 (count of elements inside array).How can i get the count of elements. ?
dataary[0].length.dataary, but it could just as easily be that they each had different lengths.But i need the count of elements inside each array- loop through the main array and extract the length of each sub array? - stackoverflow.com/questions/12502843/…But i need the count as 5You need to get answer as 5 or 15?