Answer the question
In order to leave comments, you need to log in
How to group nested array elements by heading?
There is an array:
And another array:var ind = ["Apple", "Pear", "Banana"];
let arr = [
[ "Pear", 12, 34, 54, 76, 23, 232 ],
[ "Apple", 54, 22, 11, 23, 21, 33 ],
[ "Banana", 54, 65, 11, 43, 66, 75 ],
[ "Pear", 23, 11, 46, 76, 33, 98 ],
[ "Apple", 12, 34, 54, 76, 23, 232 ],
[ "Banana", 54, 22, 11, 23, 21, 33 ],
];
let arr = [
["Apple", [54,12], [22,34], [11,54], [23,76], [21,23], [33,232]],
["Pear", [12,23], [34,11], [54,46], [76,76], [23,33], [232,38]],
["Banana", [54,54], [65,22], [11,11], [43,23], [66,21], [75,33 ]]
];
let arr = [
,
,
];
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question