A typical operation is to find if a `json` object has a given key, this is typically done like: ``` c++ json j; bool has_key = j.find("key") != j.end(); ``` The standard containers (`std::map`, `std::set`,...) offer a `count` member function that counts the number of occurrences of a key, such that one can: ``` c++ std::map<std::string, int> m; bool has_key = m.count("key"); // -> count == 0? false : true ``` It would be nice to have something similar since this is a very common operation.
Activity
Merge pull request nlohmann#45 from nlohmann/develop