Hello, i try use a loop from json parsed but without success, i use version 5.
i try :
Parsed is :
{"gpio":1,"noboard":1,"state":0},{"gpio":1,"noboard":1,"state":1},{"gpio":1,"noboard":1,"state":1}
My loop is :
DynamicJsonBuffer jsonBuffer;
JsonObject& json = jsonBuffer.parseObject(payload);
json.printTo(Serial);
Serial.println();
if (json.success()) {
for (int i = 0; i < 3 ; i++) {
int state= json["state"].as() ;
-
Serial.println(state);*
-
}*
-
}*
When show state variable, if first is 0 all 2 lines are 0
Can anibody help me?