skip to Main Content

how to group double nested arrays based on index in javascript

I'm a newbie in JavaScript so any suggestion would be much appreciated. I have this array: var mixedArray = [["online","abc","def"],["offline","ghi","jkl"],["online","mno","pqr"],["offline","stu","vwx"] ] I want to output like this: var array1 = [["online","abc","def"],["online","mno","pqr"]] var array2 = [["offline","ghi","jkl"],["offline","stu","vwx"]] Is there any method to…

VIEW QUESTION
Back To Top
Search