returns the number of occurrences of a key in a JSON object
Synopsis
Declared in <nlohmann/json.hpp>
size_type
count(object_t::key_type const& key) const;
Return Value
number of occurrences of the key (0 or 1 for a JSON object, 0 for all other types)
Parameters
Name |
Description |
key |
key to count occurrences of |
Created with MrDocs