MCPcopy Create free account
hub / github.com/danielaparker/jsoncons / erase2

Function erase2

examples/src/erase_examples.cpp:73–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73void erase2()
74{
75 // Read from input file
76 std::istringstream is(input);
77 json instance = json::parse(is);
78
79 // Select all records except ones with id '756746783'
80 auto result = jsonpath::json_query(instance, "$.*[?(@.id != '756746783')]");
81
82 // Write to output file
83 std::ostringstream os;
84 result.dump_pretty(os);
85 std::cout << os.str() << "\n\n";
86}
87
88void erase3()
89{

Callers 1

mainFunction · 0.85

Calls 2

parseFunction · 0.85
json_queryFunction · 0.85

Tested by

no test coverage detected