[Interest] How to change nested JSON object directly
Thiago Macieira
thiago.macieira at intel.com
Wed Jan 11 23:56:31 CET 2017
On quinta-feira, 12 de janeiro de 2017 06:09:23 PST jack ma wrote:
> *jsonObject["key1"].toObject().value("key2") = "somteting2"*
>
>
> but now , *toObect()* just return a copy of key1, so you can't change
> key2 directly
QJsonObject jso2 = jsonObject["key1"].toObject();
jso2["key2"] = "something2";
jsonObject["key1"] = jso2;
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Interest
mailing list