結果 : how to update an array of objects in javascript