How to arrange the position according to the data from the array

    test = 
   [
        ["qwe","1"],
        ["ewq","2"],
        ["www","4"]
        ["aaa","3"],
    ]

an array of segments as above

I want to rank according to the numbers coming from the array, not the index position of the array

can this be done?

the following is how to modify

according to the array index position.
<div class="container">
     <div>
        <ng-container *ngIf="test[0]">
            <span>{{test[0][0]}}</span>
        </ng-container>
     </div>
     <div>
        <ng-container *ngIf="test[1]">
            <span>{{test[1][0]}}</span>
        </ng-container>
     </div>
     <div>
        <ng-container *ngIf="test[2]">
            <span>{{test[2][0]}}</span>
        </ng-container>
     </div>
     <div>
        <ng-container *ngIf="test[3]">
            <span>{{test[3][0]}}</span>
        </ng-container>
     </div>
     
    </div>

Jun.15,2022

  let newTest = test.sort(function(a,b){
      return a[1]-b[1]
  })

after sorting, it is convenient to render

Menu