I have data which is coming in 1 and 0 from db and I need to show in UI Yes and No. I am using for (const obj of arr1) and map like stuff and still not able to get the desire output.
const arr = [
{id: 1, name: 'Emp1', lc: 1},
{id: 2, name: 'Emp2', lc: 0},
{id: 3, name: 'Emp3', lc: true},
{id: 4, name: 'Emp4', lc: false},
];
I need to convert this array this way
const newArr = [
{id: 1, name: 'Emp1', lc: "Yes"},
{id: 2, name: 'Emp2', lc: "No"},
{id: 3, name: 'Emp3', lc: "Yes" },
{id: 4, name: 'Emp4', lc: "No"},
];