JsonVariant::getElement()
Description
JsonVariant::getElement()
gets the value at the specified index; it reproduces JsonArray::getElement()
.
If the JsonVariant
points to an array, this function returns a JsonVariant
pointing to the element at the specified index.
If the JsonVariant
does not point to an array, this function returns a null JsonVariant
.
Instead of this function, you can use JsonVariant::operator[]
which offers a more intuitive syntax.
Signatures
JsonVariant getElement(size_t index) const;
Arguments
index
: the index of the value in the array.
Return value
JsonVariant::getElement()
returns a JsonVariant
that points to the requested value.
JsonVariant::getElement()
return null when no match is found.