the array
the object property name
object's value for the given property name
Optional
nonStrict: booleanby default test the value like "===", if nonStrict is true, will test like "=="
the given array (and not a copy)
const myObjects = [{
id: 1,
name: "Green"
}, {
id: 2,
name: "Red"
}, {
id: 3,
name: "Blue"
}]
// remove in the array the object that have a property "name" equals to "Red"
JMap.Util.Array.removeByProperty(myObjects, "name", "Red")
console.log(`myObjects: [${myObjects.join(", "")}]`)
// display message 'myObjects: [{ \"id\": 1, \"name\": \"Green\" }, { \"id\": 3, \"name\": \"Blue\" }]'
JMap.Util.Array.removeByProperty
Remove the first occurence.