JsonObjectConst::getMember()
Removed in ArduinoJson 6.20: use JsonObjectConst::operator[]
instead.
Description
JsonObjectConst::getMember()
gets the value associated with the specified key. It returns a null reference if the key is not present in the object.
If the JsonObjectConst
is null, this function returns null.
Instead of this function, you can use JsonObjectConst::operator[]
which offers a more intuitive syntax.
Signatures
JsonVariantConst getMember(const char* key) const;
JsonVariantConst getMember(const __FlashStringHelper* key) const;
JsonVariantConst getMember(const String& key) const;
JsonVariantConst getMember(const std::string& key) const;
JsonVariantConst getMember(std::string_view key) const;
Arguments
key
: the key of the value in the object.
Return value
JsonObjectConst::getMember()
returns a JsonVariantConst
that points to the value.
JsonObjectConst::getMember()
returns null if it doesn’t find the key in the object; in which case JsonVariantConst::isNull()
returns true
.