I have data like
const data = {
Name : "Apple",
Weight : 5,
Address : "Somewhere",
Contact : 777666,
X : 908,
Y : 562,
}
and another array of data as
const arrData = ["Name","Weight"];
Now I need a new data of object in a variable that has key equal to array of data. For example required data is
newData = [
{Name : "Apple"},
{Weight: "5"},
]