I have a JSON file that I need to transfer to my local object using new Object and Object Assign:
let newObj = new Object();
Object.assign(newObj, MyData.map(data => ({
personal_id : data._id,
idx : data.index,
voiceLines : data.tags
})));
console.log(newObj);
After checking the returned result, it appears as though the JSON data was successfully copied into a simple array of objects. However, the output includes extra numerical keys at the beginning like '1': {...}. How can I remove these numbers?