let myCurrentData = [
{
_id: "D01",
name: "Lunetts",
profession: "shop",
},
{
_id: "D02",
name: "Glasses",
profession: "keeper",
},
{
_id: "D03",
name: "Auros",
profession: "UiiSii",
},
];
Above is my myCurrentData, I want to convert this array into a final object like the following
let myFinalData = {
D01: "Lunetts",
D02: "Glasses",
D03: "Auros"
}
i just want to use the values of _id and name
Object.fromEntriesandmyCurrentData.mapshould help