From 5129f3400ca04d8f41ab47f3b50afb17de64b957 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Blanchon?= Date: Wed, 23 Jul 2014 12:56:29 +0200 Subject: [PATCH] Added key() and value() shortcuts --- JsonParser/JsonObjectIterator.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/JsonParser/JsonObjectIterator.h b/JsonParser/JsonObjectIterator.h index 59bd77c1..d3c1367b 100644 --- a/JsonParser/JsonObjectIterator.h +++ b/JsonParser/JsonObjectIterator.h @@ -41,6 +41,18 @@ namespace ArduinoJson { return JsonToken::operator!=(other); } + + // Get the key of the JsonPair pointed by the iterator + const char* key() const + { + return operator*().key(); + } + + // Get the key of the JsonPair pointed by the iterator + JsonValue value() const + { + return operator*().value(); + } }; } } \ No newline at end of file