Updated Bag of Tricks (markdown)

Benoît Blanchon
2016-04-16 16:20:05 +02:00
parent dff7a40d7b
commit 38ea94883b

@@ -14,12 +14,7 @@ And we want to get a `int[]` out of it:
#define MAX_LED_COUNT 10
int leds[MAX_LED_COUNT];
int ledCount = 0;
for(int led : root["leds"].asArray()) {
leds[ledCount++] = led;
if (ledCount >= MAX_LED_COUNT) break;
}
int ledCount = root["leds"].asArray().copyTo(leds);
```
See issue [#246](https://github.com/bblanchon/ArduinoJson/issues/246)