Convertir le tableau en objet avec des touches personnalisées
const peopleArrays = [
['Jimbo', '555-555-5555', '[email protected]'],
['Lakshmi', '123-456-7890', '[email protected]']
];
const peopleObjects = peopleArrays
.map(([name, phone, email]) => ({ name, phone, email }));
console.log(peopleObjects);
Run code snippet
Lucky Lyrebird