Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Assigning to nested QVariantMap



  • Hi,
    is there any way to do simple access to nested QVariantMap ?
    Something like:
    @
    // cJsonMessag is a big and nested json
    QJsonDocument msgDoc = QJsonDocument::fromJson(cJsonMessage);
    qvMap = msgDoc.object().toVariantMap();
    //just dreams :)
    getVal(qvMap , outVal, "obj0.obj1[0].obj2.param");
    setVal(qvMap , QVariant("test"), "obj0.obj1[0].obj2.param");
    @


Log in to reply