I've an array of objects and I want to modify a property in the object.
I know we can remove the object using splice function.Is the only option to remove and add it back?
You have to modify it directly (assuming You know index)
YourArray[index].ObjectProperty = YourValue
It does not make any difference if it's ES6 or not
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With