In this example, we create a QJsonDocument from a JSON string, and then check if it contains an object using the isObject method. If it does, we extract the values of the "name" and "age" keys using QJsonObject. Example 2:C++ QJsonDocument doc = QJsonDocument::fromJson("[ \"apple\", \"banana\", \"orange\" ]"); if (doc.isObject()) { // this will not be executed because the document is not an object } else { // do something else because the document is not an object } ``` In this example, we create a QJsonDocument from a JSON array, and then check if it contains an object using the isObject method. Since it's not an object, the code inside the if statement will not be executed, and we can handle the array data in the else statement. QJsonDocument is part of the Qt Core library.