mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 16:14:05 +01:00
Test that JsonArray can store integers
This commit is contained in:
@@ -1,2 +1,14 @@
|
||||
#include "JsonArray.h"
|
||||
|
||||
#include "JsonValue.h"
|
||||
|
||||
JsonValue JsonArray::operator[](int index) const
|
||||
{
|
||||
for (JsonNodeIterator it = beginChildren(); it != endChildren(); ++it)
|
||||
{
|
||||
if (!index) return JsonValue(*it);
|
||||
index--;
|
||||
}
|
||||
|
||||
return JsonValue();
|
||||
}
|
||||
Reference in New Issue
Block a user