JsonDocument::getMember() gets the value associated with the specified key; it reproduces JsonObject::getMember().

Unlike JsonDocument::getOrCreateMember(), 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.


JsonVariant getMember(const char* key);
JsonVariant getMember(String key);
JsonVariant getMember(std::string key);
JsonVariant getMember(const __FlashStringHelper* key);


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.

See also