I have a array of array having two elements each, i.e. arr[a[2]]
. Index 0 is name and index 1 is size . I want a pipe to sort the array of array according to size ie index 1 .
Example:
arr [ [ 'hello' , '1' ] , [ 'how' , '5' ] , [ 'you' , '12' ] , [ 'are' , '6' ] ]
Output of pipe should be :
arr [ [ 'hello' , '1' ] , [ 'how' , '5' ] , [ 'are' , '6' ] , [ 'you' , '12' ] ]
HTML file:
<p> {{items | custompipe }}</p>