DEV Community

Cover image for JavaScript Sorting Multidimensional Array
Chandra
Chandra

Posted on • Edited on • Originally published at fast2learning.com

JavaScript Sorting Multidimensional Array

Sorting is a technique to arrange item to Increasing or Decreasing order

Sorting of item done by comparison of another item or element

Sort Single Dimensional Array

Single Dimensional Array have sorted by javascript sort method

Image description
Single dimension array sorting output

Image description

Sorting Multidimension Array

Multidimensional array sorted using array sort() method

Multidimensional array sorted on the basis of column index number

In below image we sort array on the basis of third column or element ( 2 index ) of inner array

Image description
Output of multidimension array sorting

Image description
Learn more artical related to Web Dev also visit fast2learning.com

Top comments (0)