Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Not supporting nested objects #10

@rxjs-space

Description

@rxjs-space

The doc in db:

{"details": {
    "parts": [
          {"id": "p001", "name": "abc"}
        ]
  }
}

the json-patch to apply:

[ { op: 'add',
    path: '/details/parts/2',
    value: { id: 'p002', name: 'xyz' } }]

the query generated:

{ '$push': { 'details.parts.2': { id: 'p002', name: 'xyz' } } }

with above query, the doc after change:

details.parts[1] === [{id: 'p002', name: 'xyz'}]

but the doc expected is actually:

details.parts[1] = {id: 'p002', name: 'xyz'}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions