This is a minor problem, but I think it's worth to mention it.
json j2 = {
{"pi", 3.141},
{"happy", true}};
j2["abc"] = "123";
std::cout << j2.dump(4) << std::endl;
I get as output
{
"abc": "123", -->> shouldn't this be at the end? Because I inserted it later in the json
"happy": true,
"pi": 3.141
}
How can I insert it at the end, except creating another json and using update function?
Thanks
This is a minor problem, but I think it's worth to mention it.
I get as output
How can I insert it at the end, except creating another json and using
updatefunction?Thanks