JsonDocument::getMember()
Removed in ArduinoJson 6.20: use JsonDocument::operator[]
instead.
Description
JsonDocument::getMember()
gets the value associated with the specified key; it reproduces JsonObject::getMember()
.
Unlike JsonDocument::getOrAddMember()
, this function doesn’t add a new key in the object; instead, it returns null.
Instead of this function, you can use JsonDocument::operator[]
which offers a more intuitive syntax.
Signatures
JsonVariant getMember(const char* key);
JsonVariant getMember(String key);
JsonVariant getMember(std::string key);
JsonVariant getMember(const __FlashStringHelper* key);
JsonVariant getMember(std::string_view key);
Arguments
key
: the key of the value in the object.
Return value
JsonDocument::getMember()
returns a JsonVariant
that points to the requested value.
JsonDocument::getMember()
return null when no match is found.