есть такая структура:
const data = [
{ id: 2, phone: '+123', name: 'Peter Griffin', city: 'New York', street: 'Madison Square', house: 123, floor: 11, },
{ id: 23, phone: '+145', name: 'Glen Quagmire', city: 'Los Angeles', street: 'Worth Street', house: 456, floor: 12, },
{ id: 31, phone: '+167', name: 'John Swanson', city: 'Texas', street: 'Thompson Street', house: 789, floor: 22, },
];
должна быть такая:
const data = [
{ id: 2, phone: '+123', name: 'Peter Griffin', address: "New York, Madison Square, 123/11" }
{ id: 23, phone: '+145', name: 'Glen Quagmire', address: "Los Angeles, Worth Street, 456/12" }
{ id: 31, phone: '+167', name: 'John Swanson', address: "Texas, Thompson Street, 789/22" }
]
т.е последние 4 свойства (city, street, house, floor) нужно объединить в один полный адрес