How To Update Array Of Objects In Javascript Using Spread Operator