Foreach Through QJsonObject to get Key/Value Pair
<p>I am wondering how I would <code>foreach</code> through a <code>QJsonObject</code> to get the key/value pairs in C++? So far, I am only able to get the value.</p>

<pre><code>//main.cpp
QFile file(":/geoip.json");
file.open(QIODevice::ReadOnly);
QByteArray rawData = file.readAll();
file.close();
QJsonDocument doc(QJsonDocument::fromJson(rawData));
QJsonObject json = doc.object();
foreach(const QJsonValue &amp;value, json) {
    QJsonObject obj = value.toObject();
    qDebug() &lt;&lt; value;
}

//geoip.json
{
    "Afghanistan": "58.147.159.255",
    "Albania": "31.22.63.255",
    "Algeria": "105.235.143.255",
    "American Samoa": "202.70.115.241",
    "Andorra": "109.111.127.255",
    "Angola": "105.175.255.255",
    "Anguilla": "208.66.50.44",
    "Antarctica": "46.36.195.10"
}
</code></pre>