From 63633631e480bb2f2b048dc58aea7ffd725a4f85 Mon Sep 17 00:00:00 2001 From: Aroop 'FinlayDaG33k' Roelofs Date: Mon, 21 Nov 2016 11:38:38 +0100 Subject: [PATCH] Updated Decoding JSON (markdown) --- Decoding-JSON.md | 7 +++++++ 1 file changed, 7 insertions(+) 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 :)