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