updates a JSON object from another object, overwriting existing keys

Synopsis

Declared in <nlohmann/json.hpp>

void
update(
    const_iterator first,
    const_iterator last,
    bool merge_objects = false);

Parameters

Name

Description

first

iterator to the first element of the range of key/value pairs to update from

last

iterator past the last element of the range of key/value pairs to update from

merge_objects

whether to merge nested objects recursively instead of overwriting them

Created with MrDocs