-
-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Labels
@havardthom
Description
I'm missing an option to insert value into Array instead of overwriting the existing value. Similar to the merge
option that currently exists for Objects. Something like:
obj = {"path": {"to": {"array": ["oldValue"]}}}
set(obj, ["path", "to", "array", 0], "newValue", { insert: true ))
console.log(obj)
{"path": {"to": {"array": ["newValue", "oldValue"]}}}
I checked out the related projects but did not find a way to do this, please let me know if I missed something.