Sha256: b9939bb19d30fe9fcb68f9361ccfeb74141ea08e032727b5637af2cabdf5e076
Contents?: true
Size: 462 Bytes
Versions: 1
Compression:
Stored size: 462 Bytes
Contents
#include <iostream> #include <nlohmann/json.hpp> using json = nlohmann::json; int main() { // create a JSON object json j_object = {{"one", 1}, {"two", 2}}; // call find auto count_two = j_object.count("two"); auto count_three = j_object.count("three"); // print values std::cout << "number of elements with key \"two\": " << count_two << '\n'; std::cout << "number of elements with key \"three\": " << count_three << '\n'; }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simdjson-0.3.0 | vendor/simdjson/dependencies/json/doc/examples/count.cpp |