How to add a new object (key-value pair) to an array in javascript? September 27, 2023 by Tarik Use .push: items.push({'id':5});