1 #include <iostream> 2 #include <nlohmann/json.hpp> 3 4 using json = nlohmann::json; 5 main()6int main() 7 { 8 // create two JSON objects 9 json j1 = {{"one", "eins"}, {"two", "zwei"}}; 10 json j2 = {{"eleven", "elf"}, {"seventeen", "siebzehn"}}; 11 12 // output objects 13 std::cout << j1 << '\n'; 14 std::cout << j2 << '\n'; 15 16 // insert range from j2 to j1 17 j1.insert(j2.begin(), j2.end()); 18 19 // output result of insert call 20 std::cout << j1 << '\n'; 21 } 22