push() is for arrays, not objects, so use the right data structure.

var data = [];
// ...
data[0] = { "ID": "1", "Status": "Valid" };
data[1] = { "ID": "2", "Status": "Invalid" };
// ...
var tempData = [];
for ( var index=0; index<data.length; index++ ) {
    if ( data[index].Status == "Valid" ) {
        tempData.push( data );
    }
}
data = tempData;
Answer from Matt Ball on Stack Overflow
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ javascript โ€บ how-to-push-an-object-into-another-object-in-javascript
How to Push an Object into Another Object in JavaScript ? - GeeksforGeeks
July 23, 2025 - In JavaScript, the concept of pushing an object into another object involves embedding one object within another as a property. This technique is useful for organizing data structures where related information is grouped, enhancing the ability ...
๐ŸŒ
Bobby Hadz
bobbyhadz.com โ€บ blog โ€บ javascript-push-object-to-array
How to Push an Object to an Array in JavaScript | bobbyhadz
The Array.push() method takes one or more values and pushes them to the array. This enables us to pass multiple, comma-separated objects as arguments in the call to the push() method.
๐ŸŒ
Go Make Things
gomakethings.com โ€บ how-to-add-a-new-item-to-an-object-at-a-specific-position-with-vanilla-js
How to add a new item to an object at a specific position with vanilla JS | Go Make Things
Loop through the original object. If the index variable equals the position you want to insert the new key/value pair into, push that to the new object.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ how-to-push-an-array-into-the-object-in-javascript
How to Push an Array into Object in JavaScript? | GeeksforGeeks
January 9, 2025 - To push an array into the Object in JavaScript, we will be using the JavaScript Array push() method. First, ensure that the object contains a property to hold the array data.
Find elsewhere
๐ŸŒ
MDN Web Docs
developer.mozilla.org โ€บ en-US โ€บ docs โ€บ Web โ€บ JavaScript โ€บ Reference โ€บ Global_Objects โ€บ Object โ€บ assign
Object.assign() - JavaScript | MDN
The Object.assign() static method copies all enumerable own properties from one or more source objects to a target object. It returns the modified target object.
๐ŸŒ
Sabe
sabe.io โ€บ blog โ€บ javascript-push-object-to-array
How to Push an Object to an Array in JavaScript
April 20, 2022 - When you have an an array of objects and want to push another object to the end of the array, you can use the push() method. This method takes the object as a parameter and adds it at the end of the array.
๐ŸŒ
Stack Abuse
stackabuse.com โ€บ bytes โ€บ push-an-object-to-an-array-in-javascript
Push an Object to an Array in JavaScript
July 23, 2022 - To achieve this, we'll use the push method. let array = []; let obj = { name: 'Billy', age: 30, role: 'admin' }; array.push(obj); console.log(array); // [{name: 'Billy', age: 30, role: 'admin'}] As you can see, we simply pass the obj object to the push() method and it will add it to the end ...
๐ŸŒ
Linux Hint
linuxhint.com โ€บ javascript-object-push-function
JavaScript Object push() Function
Linux Hint LLC, [email protected] 1210 Kelly Park Circle, Morgan Hill, CA 95037 Privacy Policy and Terms of Use
๐ŸŒ
W3Resource
w3resource.com โ€บ javascript โ€บ object-property-method โ€บ array-push.php
JavaScript push() Method : Array Object
var fruitslist = new Array("Orange", "Apple"); var newParagraph = document.createElement("p"); var newText = document.createTextNode("Fruits List : " + fruitslist); newParagraph.appendChild(newText); document.body.appendChild(newParagraph); var newParagraph1 = document.createElement("p"); var newText1 = document.createTextNode("Now add 'Banana' and 'Chery' as new fruits."); newParagraph1.appendChild(newText1); document.body.appendChild(newParagraph1); var newfruitslist=fruitslist.push("Banana", "Chery"); var newParagraph2 = document.createElement("p"); var newText2 = document.createTextNode("N
๐ŸŒ
Delft Stack
delftstack.com โ€บ home โ€บ howto โ€บ javascript โ€บ javascript append to object
How to Append Values to Object in JavaScript | Delft Stack
February 2, 2024 - Object.assign() is crucial for merging and cloning objects, the spread syntax operator excels in appending properties while preserving object immutability, and the push() method is essential for adding elements to arrays. For developers seeking to expand their JavaScript skills, practicing these methods in various scenarios is key.
๐ŸŒ
Attacomsian
attacomsian.com โ€บ blog โ€บ javascript-push-object-to-array
Push an object to an array in JavaScript
June 10, 2023 - Use the Array.push() method. Provide one or more objects as arguments.