Posts by Marlus Araujo • 21 points
1 post
-
2
votes1
answer777
viewsA: Organize object array according to one of its attributes
You must pass a comparison function as parameter of sort: objetos.sort(function(a, b) { return parseInt(a.idade) - parseInt(b.idade); }); Reference:…