push object into array You have to create an object. Assign the values to the object. Then push it into the array: