Skip to content

How to erase nested objects inside other objects? #728

Description

@sqwunkly

Hello Niels,

Is it possible to erase/delete nested objects using a similar technique as you've created for adding nested objects inside other objects?

​​j["answer"]["everything"] = 42;

image

Is there an equivalent way to do j.erase(​["answer"]["everything"]; (ie, doesn't work) ?

This ​j​​["answer"]["everything"] = 42; is neat for adding nested objects inside other objects but so far I'm unable to find a corresponding function in your library to delete/erase nested objects. Is there a way to do this?

My apologies if I've missed something obvious. Hoping you can help me with these two questions. Much thanks. Greg

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions