Powiadomienia
Wyczyść wszystko
BugOverflow
1
Wpisy
1
Użytkownicy
0
Reactions
658
Widoki
0
06/03/2023 9:13 pm
Rozpoczynający temat
how to sort VUE / JS attribute that contains list of object insted of array
1 odpowiedź
0
06/03/2023 9:15 pm
Rozpoczynający temat
example code (sorting districts by demand for industry object)
industry.districts = Object.values(industry.districts); industry.districts.sort((a, b) => a.demand < b.demand ? 1 : b.demand < a.demand ? -1 : 0 );