0
let meuArray = [
{codigo: 1, nome: Jose, idade: 33}
,{codigo: 2, nome: Jose, idade: 32}
,{codigo: 3, nome: Maria, idade: 31}
,{codigo: 4, nome: Joao, idade: 30}
,{codigo: 5, nome: Aroldo, idade: 29}
,{codigo: 6, nome: Aristide, idade: 28}
,{codigo: 7, nome: Aline, idade: 27}
,{codigo: 8, nome: Amelia, idade: 26}
,{codigo: 9, nome: Milena, idade: 25}
,{codigo: 10, nome: Andrea, idade: 24}
]
I have this array of objects (Obviously in a real example, they are a minimum of 10,000 records). I would like to reorder not the array lines, but the object attributes. Type: Set Age to First, Code to Last. Ex: {age: 24, name: Andrea, code: 10}.
Any idea? of the traditional forms (using the for), gets much, much slower.
Why?????????????????? this has no effect, what is the reason why ?
– novic
What do you mean? Reorganize the properties? That doesn’t make any sense!
– Jéf Bueno