-
Sort it with the key type code 2,2,2,5,5
-
Take that and sort it with type without changing the code order
-
Take the second array and sort it with price without changing the code and type order
I put an example code in stackblitz.com
https://stackblitz.com/edit/react-ts-vjervg?file=App.tsx
Can someone pls help me on this.