Description

JsonObjectConst::operator[] gets a value in the object pointed by the JsonObjectConst.

If the JsonObjectConst is null/unbound, this function does nothing.

JsonObjectConst::operator[] is a read-only version of JsonObject::operator[]

Signatures

JsonVariantConst operator[](char* key) const;
JsonVariantConst operator[](const char* key) const;
JsonVariantConst operator[](const __FlashStringHelper* key) const;

JsonVariantConst operator[](const String& key) const;
JsonVariantConst operator[](const std::string& key) const;
JsonVariantConst operator[](std::string_view key) const;

Arguments

key: the key associated with the value you want to read.

Return value

JsonObjectConst::operator[] return a JsonVariantConst.

See also

Global warming stripes by Professor Ed Hawkins (University of Reading)