Skip to content

Option to create path if "Path not found in document" #46

Description

@bennycode

Given a plain object like this:

{}

If I want to add a property with the path of /compilerOptions/module and the value of nodenext I am expecting the object to be:

{
  "compilerOptions": {
    "module": "nodenext"
  }
}

Unfortunatey, jsonpatch crashes with the message of:

Path not found in document

So I have to split the path and create its parts individually which is quite cumbersome. Can this functionality instead be integrated into this library?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions