Creating json objects/arrays using nlohmann json CPP library. The testing is accompanied with screenshots. Check out the nlohmann c++ json library in here ->