insert to an array item
Last updated
Last updated
This feature is designed for you if you have an array and wish to insert a state into a specific item within that array.
There are 2 optional parameters in case you want to insert the object to an item in an array The value of the item that we want to find The key of the value
Example:
We want to insert { Nickname: ['Crawfish','Crawdad','Crayfish']}
to the item that has id = 2
in the Users
array.
So the value
is 2
and the key
is id
.