access specified object element with default value
Declared in <nlohmann/json.hpp>
template<class ValueType>
requires !detail::is_transparent<object_comparator_t>::value
&& detail::is_getable<basic_json_t, ValueType>::value
&& !std::is_same<value_t, detail::uncvref_t<ValueType>>::value
ValueType
value(
object_t::key_type const& key,
ValueType const& default_value) const;
value at key if found, otherwise default_value
| Name | Description |
|---|---|
| key | key of the element to access |
| default_value | value to return if key is not found |