Skip to content

insert(or merge) object should replace same key , not ignore #661

Description

@itviewer
json j1 = {{"one", 123}, {"two", 123}};
json j2 = {{"one", 456}};
j1.insert(j2.begin(), j2.end());

As key "one" has exist, now the result j1 is still {{"one", 123}, {"two", 123}}
while I think more commonly used logic is replace the same key,that is the result should be {{"one", 456}, {"two", 123}}

Thanks

Activity

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

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions