JSFiddle - React, Tailwind, and code Playground
by John Wick
JavaScript
console.clear();
const arr = [
{ data: { name: "first", type: "child" } },
{ data: { name: "second", type: "parent" } },
];
const a = arr.map(e => ({
data: {
name: e.name,
type: e.type.toUpperCase()
}
}))
console.log(a);