let information = [{
id: 22,
cno: 1,
username: 'white',
name: 'New Complaint',
stype: null,
cname: 'ff',
product: 'ff',
}];
let updatedInformation = information.map(item => {
return ({ cno: item.cno + 1 })
});
console.log(updatedInformation); // output [ { cno: 2} ]
Is it possible to achieve my expected output as an object without wrapping it in an array using map function?
Ultimately, I want { cno : 2}