check the existence of an element in a JSON object
Declared in <nlohmann/json.hpp>
template<class KeyType>
requires detail::is_usable_as_basic_json_key_type<basic_json_t, KeyType>::value
bool
contains(KeyType&& key) const;
whether the JSON object contains an element with the given key
| Name | Description |
|---|---|
| key | key to check for |