Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Feature request: Insert to Array option #36

Open
@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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /