diff --git a/controller/EmbeddedNetworkController.cpp b/controller/EmbeddedNetworkController.cpp index ac1947ce4..85fbb4dc8 100644 --- a/controller/EmbeddedNetworkController.cpp +++ b/controller/EmbeddedNetworkController.cpp @@ -997,16 +997,14 @@ void EmbeddedNetworkController::configureHTTPControlPlane( return; } - json out = json::array(); + json out = json::object(); std::vector memTmp; if (_db.get(nwid, network, memTmp)) { for (auto m = memTmp.begin(); m != memTmp.end(); ++m) { int revision = OSUtils::jsonInt((*m)["revision"], 0); std::string id = OSUtils::jsonString((*m)["id"], ""); if (id.length() == 10) { - json tmp = json::object(); - tmp[id] = revision; - out.push_back(tmp); + out[id] = revision; } } }