You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Is it possible to modify array address without rewriting existing fields, for example I have this json: nlohmann::json j = { { "name", "oleg" }, { "address", { "city", "kharkiv" } } };
And I need to add several fields to array address: j["address"] = nlohmann::json { { "country", "ukraine"}, { "street", "svobody"} };
This variant rewrite array address and I lose data which were in it before I added new one.
So my question is: Is it possible to add data to existing array without loss existing one. Thanks.
The text was updated successfully, but these errors were encountered:
Hi,
Is it possible to modify array
address
without rewriting existing fields, for example I have thisjson
:nlohmann::json j = { { "name", "oleg" }, { "address", { "city", "kharkiv" } } };
And I need to add several fields to array
address
:j["address"] = nlohmann::json { { "country", "ukraine"}, { "street", "svobody"} };
This variant rewrite array
address
and I lose data which were in it before I added new one.So my question is: Is it possible to add data to existing
array
without loss existing one. Thanks.The text was updated successfully, but these errors were encountered: