var note = {
text: "test 1",
badges: ["testing", "111"],
};
var note2 = {
text: "test 2",
badges: ["testing", "222"],
};
var newData = {...note, ...note2}
console.log("newData :", newData);
The output is not what im looking for, it overwrites it and only shows the last obj. Im expecting like having both objects on a single one or should I use an array for that instead?
textinnoteandnote2as well and when you do this{...note, ...note2},note2'stextoverrides the easiernote.text.