nlohmann::ordered_map::operator[]

accesses the element with the given key, inserting a default-constructed value if it does not exist

Synopsis

Declared in <nlohmann/ordered_map.hpp>

T&
operator[](key_type const& key);

Return Value

reference to the value associated with key

Parameters

NameDescription
key [in]key of the element to access