Removed in ArduinoJson 6.20: use JsonDocument::operator[] instead.

Description

JsonDocument::getElement() gets the value at the specified index; it reproduces JsonArray::getElement().

Instead of this function, you can use JsonDocument::operator[] which offers a more intuitive syntax.

Signatures

JsonVariant getElement(size_t index);

Arguments

index: the index of the value in the array.

key: the key of the value in the object.

Return value

JsonDocument::getElement() returns a JsonVariant that points to the requested value.

JsonDocument::getElement() return null when no match is found.

See also

Global warming stripes by Professor Ed Hawkins (University of Reading)