I have two arrays. How can I join them into one multidimensional array?
The first array is:
var arrayA = ['Jhon, Connor, 12, 62626262662',
'Lisa, Ann, 43, 672536452',
'Sophie, Lynn, 23, 636366363'];
My other array has the values:
var arrayB = ['Jhon', 'Lisa', 'Sophie'];
How could I get an array with this format??
var jarray = [['Jhon', ['Jhon, Connor, 12, 62626262662']],
['Lisa', ['Lisa, Ann, 43, 672536452']],
['Sohphie', ['Sophie, Lynn, 23, 636366363']]]
However, I wouldn’t call that “multidimensional array” – that usually refers to arrays that include items of the same type. Also I’m not sure why you want the second part of your arrays be an one-element array.