returns the number of occurrences of a key 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
size_type
count(KeyType&& key) const;
number of occurrences of the key (0 or 1 for a JSON object, 0 for all other types)
| Name | Description |
|---|---|
| key | key to count occurrences of |