I have an object data = { nationality: "American", cars: 2, age: 56, "favourite meat": "chicken", location: "Sta Barbara", name: "alison", };
and I have an array order = ["name", "age", "location", "cars", "favourite meat", "nationality"];
how I can sort the object according to the given array? how I can do this one?