implement a method fun (tt,arr) that makes the array object arr, output in the specified order tt;
let tt={
city:"",
age:"",
name:""
}
let arr=[
{
name: "xiaoming",
age: 15,
city:"sz"
},
{
name: "xiaoming",
age: 16,
city:"sz"
}
]
final result:
let arr2=[
{
city:"sz",
age: 15,
name: "xiaoming",
},
{
city:"sz",
age: 16,
name: "xiaoming",
}
]