diff --git a/Decoding-JSON.md b/Decoding-JSON.md index a2fc490..e12327a 100644 --- a/Decoding-JSON.md +++ b/Decoding-JSON.md @@ -146,6 +146,13 @@ You can also iterate through the key-value pairs of the object: Serial.println(it->value.asString()); } +Or if you want to iterate through a nested array: + + JsonObject& data = variables["data"]; + for (auto dataobj : data){ + Serial.println(dataobj.key); + } + ## Advanced Example Let's take what we've learned above up a gear :)