diff --git a/include/ibm/management_console_rest.hpp b/include/ibm/management_console_rest.hpp
index c2bf14a..edf64a4 100644
--- a/include/ibm/management_console_rest.hpp
+++ b/include/ibm/management_console_rest.hpp
@@ -246,8 +246,8 @@
             const std::filesystem::path& pathObj = file.path();
             if (std::filesystem::is_regular_file(pathObj))
             {
-                pathObjList.push_back("/ibm/v1/Host/ConfigFiles/" +
-                                      pathObj.filename().string());
+                pathObjList.emplace_back("/ibm/v1/Host/ConfigFiles/" +
+                                         pathObj.filename().string());
             }
         }
     }
diff --git a/include/openbmc_dbus_rest.hpp b/include/openbmc_dbus_rest.hpp
index 82e3ecd..5125764 100644
--- a/include/openbmc_dbus_rest.hpp
+++ b/include/openbmc_dbus_rest.hpp
@@ -144,7 +144,7 @@
         nlohmann::json::object_t object;
         object["path"] = objectPath;
 
-        transaction->res.jsonValue["objects"].push_back(std::move(object));
+        transaction->res.jsonValue["objects"].emplace_back(std::move(object));
 
         tinyxml2::XMLDocument doc;
 
@@ -1356,7 +1356,7 @@
     {
         for (auto& obj : data)
         {
-            transaction->methodResponse.push_back(std::move(obj));
+            transaction->methodResponse.emplace_back(std::move(obj));
         }
         return;
     }
@@ -1366,13 +1366,13 @@
         // They are different types. May as well turn them into an array
         nlohmann::json j = std::move(transaction->methodResponse);
         transaction->methodResponse = nlohmann::json::array();
-        transaction->methodResponse.push_back(std::move(j));
-        transaction->methodResponse.push_back(std::move(data));
+        transaction->methodResponse.emplace_back(std::move(j));
+        transaction->methodResponse.emplace_back(std::move(data));
         transaction->convertedToArray = true;
     }
     else
     {
-        transaction->methodResponse.push_back(std::move(data));
+        transaction->methodResponse.emplace_back(std::move(data));
     }
 }
 
@@ -2199,7 +2199,7 @@
                 {
                     nlohmann::json::object_t interfaceObj;
                     interfaceObj["name"] = ifaceName;
-                    interfacesArray.push_back(std::move(interfaceObj));
+                    interfacesArray.emplace_back(std::move(interfaceObj));
                 }
 
                 interface = interface->NextSiblingElement("interface");
@@ -2291,7 +2291,7 @@
                             thisArg[fieldName] = fieldValue;
                         }
                     }
-                    argsArray.push_back(std::move(thisArg));
+                    argsArray.emplace_back(std::move(thisArg));
                     arg = arg->NextSiblingElement("arg");
                 }
 
@@ -2314,7 +2314,7 @@
                     object["uri"] = std::move(uri);
                     object["args"] = argsArray;
 
-                    methodsArray.push_back(std::move(object));
+                    methodsArray.emplace_back(std::move(object));
                 }
                 methods = methods->NextSiblingElement("method");
             }
@@ -2344,7 +2344,7 @@
                     nlohmann::json::object_t object;
                     object["name"] = name;
                     object["args"] = argsArray;
-                    signalsArray.push_back(std::move(object));
+                    signalsArray.emplace_back(std::move(object));
                 }
 
                 signals = signals->NextSiblingElement("signal");
@@ -2461,7 +2461,7 @@
                 {
                     nlohmann::json::object_t object;
                     object["name"] = name;
-                    objectsSub.push_back(std::move(object));
+                    objectsSub.emplace_back(std::move(object));
                 }
             }
         };
diff --git a/include/persistent_data.hpp b/include/persistent_data.hpp
index e93d216..4344074 100644
--- a/include/persistent_data.hpp
+++ b/include/persistent_data.hpp
@@ -243,7 +243,7 @@
                 {
                     session["client_id"] = *p.second->clientId;
                 }
-                sessions.push_back(std::move(session));
+                sessions.emplace_back(std::move(session));
             }
         }
         nlohmann::json& subscriptions = data["subscriptions"];
@@ -286,7 +286,7 @@
             subscription["MetricReportDefinitions"] =
                 subValue->metricReportDefinitions;
 
-            subscriptions.push_back(std::move(subscription));
+            subscriptions.emplace_back(std::move(subscription));
         }
         persistentFile << data;
     }
diff --git a/redfish-core/include/redfish_aggregator.hpp b/redfish-core/include/redfish_aggregator.hpp
index 896eb4a..1c514ec 100644
--- a/redfish-core/include/redfish_aggregator.hpp
+++ b/redfish-core/include/redfish_aggregator.hpp
@@ -953,7 +953,7 @@
                 auto& satMembers = jsonVal["Members"];
                 for (auto& satMem : satMembers)
                 {
-                    members.push_back(std::move(satMem));
+                    members.emplace_back(std::move(satMem));
                 }
                 asyncResp->res.jsonValue["Members@odata.count"] =
                     members.size();
diff --git a/redfish-core/include/utils/collection.hpp b/redfish-core/include/utils/collection.hpp
index f2f0669..05e4b4d 100644
--- a/redfish-core/include/utils/collection.hpp
+++ b/redfish-core/include/utils/collection.hpp
@@ -80,7 +80,7 @@
             crow::utility::appendUrlPieces(url, leaf);
             nlohmann::json::object_t member;
             member["@odata.id"] = std::move(url);
-            members.push_back(std::move(member));
+            members.emplace_back(std::move(member));
         }
         aResp->res.jsonValue["Members@odata.count"] = members.size();
         });
diff --git a/redfish-core/include/utils/sw_utils.hpp b/redfish-core/include/utils/sw_utils.hpp
index 7c746a0..28cb41b 100644
--- a/redfish-core/include/utils/sw_utils.hpp
+++ b/redfish-core/include/utils/sw_utils.hpp
@@ -199,7 +199,7 @@
                         member["@odata.id"] = crow::utility::urlFromPieces(
                             "redfish", "v1", "UpdateService",
                             "FirmwareInventory", swId);
-                        softwareImageMembers.push_back(std::move(member));
+                        softwareImageMembers.emplace_back(std::move(member));
                         aResp->res
                             .jsonValue["Links"]["SoftwareImages@odata.count"] =
                             softwareImageMembers.size();
diff --git a/redfish-core/lib/account_service.hpp b/redfish-core/lib/account_service.hpp
index c9d4eb8..8a68aae 100644
--- a/redfish-core/lib/account_service.hpp
+++ b/redfish-core/lib/account_service.hpp
@@ -404,7 +404,7 @@
                     nlohmann::json::object_t roleMapEntry;
                     roleMapEntry["LocalRole"] = *localRole;
                     roleMapEntry["RemoteGroup"] = *remoteGroup;
-                    remoteRoleJson.push_back(std::move(roleMapEntry));
+                    remoteRoleJson.emplace_back(std::move(roleMapEntry));
                     },
                     ldapDbusService, dbusObjectPath, ldapPrivMapperInterface,
                     "Create", *remoteGroup,
@@ -1585,7 +1585,7 @@
                 nlohmann::json::object_t member;
                 member["@odata.id"] = "/redfish/v1/AccountService/Accounts/" +
                                       user;
-                memberArray.push_back(std::move(member));
+                memberArray.emplace_back(std::move(member));
             }
         }
         asyncResp->res.jsonValue["Members@odata.count"] = memberArray.size();
diff --git a/redfish-core/lib/certificate_service.hpp b/redfish-core/lib/certificate_service.hpp
index 4e030d2..9aa2145 100644
--- a/redfish-core/lib/certificate_service.hpp
+++ b/redfish-core/lib/certificate_service.hpp
@@ -725,7 +725,7 @@
     {
         if (optKeyUsage->empty())
         {
-            optKeyUsage->push_back("ServerAuthentication");
+            optKeyUsage->emplace_back("ServerAuthentication");
         }
         else if (optKeyUsage->size() == 1)
         {
@@ -748,7 +748,7 @@
     {
         if (optKeyUsage->empty())
         {
-            optKeyUsage->push_back("ClientAuthentication");
+            optKeyUsage->emplace_back("ClientAuthentication");
         }
         else if (optKeyUsage->size() == 1)
         {
diff --git a/redfish-core/lib/ethernet.hpp b/redfish-core/lib/ethernet.hpp
index e4e7b5a..0ea53e2 100644
--- a/redfish-core/lib/ethernet.hpp
+++ b/redfish-core/lib/ethernet.hpp
@@ -1667,7 +1667,7 @@
             ipv4StaticArray.push_back(ipv4);
         }
 
-        ipv4Array.push_back(std::move(ipv4));
+        ipv4Array.emplace_back(std::move(ipv4));
     }
 
     std::string ipv6GatewayStr = ethData.ipv6DefaultGateway;
@@ -1692,13 +1692,13 @@
         ipv6["PrefixLength"] = ipv6Config.prefixLength;
         ipv6["AddressOrigin"] = ipv6Config.origin;
 
-        ipv6Array.push_back(std::move(ipv6));
+        ipv6Array.emplace_back(std::move(ipv6));
         if (ipv6Config.origin == "Static")
         {
             nlohmann::json::object_t ipv6Static;
             ipv6Static["Address"] = ipv6Config.address;
             ipv6Static["PrefixLength"] = ipv6Config.prefixLength;
-            ipv6StaticArray.push_back(std::move(ipv6Static));
+            ipv6StaticArray.emplace_back(std::move(ipv6Static));
         }
     }
 }
@@ -1753,7 +1753,7 @@
                     iface["@odata.id"] = crow::utility::urlFromPieces(
                         "redfish", "v1", "Managers", "bmc",
                         "EthernetInterfaces", ifaceItem);
-                    ifaceArray.push_back(std::move(iface));
+                    ifaceArray.emplace_back(std::move(iface));
                 }
             }
 
@@ -2176,7 +2176,7 @@
                         "redfish", "v1", "Managers", "bmc",
                         "EthernetInterfaces", rootInterfaceName, "VLANs",
                         ifaceItem);
-                    ifaceArray.push_back(std::move(iface));
+                    ifaceArray.emplace_back(std::move(iface));
                 }
             }
 
diff --git a/redfish-core/lib/event_service.hpp b/redfish-core/lib/event_service.hpp
index 82004e0..f74f215 100644
--- a/redfish-core/lib/event_service.hpp
+++ b/redfish-core/lib/event_service.hpp
@@ -211,7 +211,7 @@
             nlohmann::json::object_t member;
             member["@odata.id"] = "/redfish/v1/EventService/Subscriptions/" +
                                   id;
-            memberArray.push_back(std::move(member));
+            memberArray.emplace_back(std::move(member));
         }
         });
     BMCWEB_ROUTE(app, "/redfish/v1/EventService/Subscriptions/")
diff --git a/redfish-core/lib/hypervisor_system.hpp b/redfish-core/lib/hypervisor_system.hpp
index ec59140..84563ba 100644
--- a/redfish-core/lib/hypervisor_system.hpp
+++ b/redfish-core/lib/hypervisor_system.hpp
@@ -510,7 +510,7 @@
             {
                 ipv4StaticArray.push_back(ipv4);
             }
-            ipv4Array.push_back(std::move(ipv4));
+            ipv4Array.emplace_back(std::move(ipv4));
         }
     }
 }
@@ -764,7 +764,7 @@
             ethIface["@odata.id"] = crow::utility::urlFromPieces(
                 "redfish", "v1", "Systems", "hypervisor", "EthernetInterfaces",
                 name);
-            ifaceArray.push_back(std::move(ethIface));
+            ifaceArray.emplace_back(std::move(ethIface));
         }
         asyncResp->res.jsonValue["Members@odata.count"] = ifaceArray.size();
         });
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index c52c99b..c6b1354 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -563,7 +563,7 @@
                                                  "/attachment";
                 thisEntry["AdditionalDataSizeBytes"] = size;
             }
-            entriesArray.push_back(std::move(thisEntry));
+            entriesArray.emplace_back(std::move(thisEntry));
         }
         asyncResp->res.jsonValue["Members@odata.count"] = entriesArray.size();
         },
@@ -1102,25 +1102,25 @@
         nlohmann::json::object_t eventLog;
         eventLog["@odata.id"] =
             "/redfish/v1/Systems/system/LogServices/EventLog";
-        logServiceArray.push_back(std::move(eventLog));
+        logServiceArray.emplace_back(std::move(eventLog));
 #ifdef BMCWEB_ENABLE_REDFISH_DUMP_LOG
         nlohmann::json::object_t dumpLog;
         dumpLog["@odata.id"] = "/redfish/v1/Systems/system/LogServices/Dump";
-        logServiceArray.push_back(std::move(dumpLog));
+        logServiceArray.emplace_back(std::move(dumpLog));
 #endif
 
 #ifdef BMCWEB_ENABLE_REDFISH_CPU_LOG
         nlohmann::json::object_t crashdump;
         crashdump["@odata.id"] =
             "/redfish/v1/Systems/system/LogServices/Crashdump";
-        logServiceArray.push_back(std::move(crashdump));
+        logServiceArray.emplace_back(std::move(crashdump));
 #endif
 
 #ifdef BMCWEB_ENABLE_REDFISH_HOST_LOGGER
         nlohmann::json::object_t hostlogger;
         hostlogger["@odata.id"] =
             "/redfish/v1/Systems/system/LogServices/HostLogger";
-        logServiceArray.push_back(std::move(hostlogger));
+        logServiceArray.emplace_back(std::move(hostlogger));
 #endif
         asyncResp->res.jsonValue["Members@odata.count"] =
             logServiceArray.size();
@@ -1148,7 +1148,7 @@
                     member["@odata.id"] =
                         "/redfish/v1/Systems/system/LogServices/PostCodes";
 
-                    logServiceArrayLocal.push_back(std::move(member));
+                    logServiceArrayLocal.emplace_back(std::move(member));
 
                     asyncResp->res.jsonValue["Members@odata.count"] =
                         logServiceArrayLocal.size();
@@ -1443,7 +1443,7 @@
                     continue;
                 }
 
-                logEntryArray.push_back(std::move(bmcLogEntry));
+                logEntryArray.emplace_back(std::move(bmcLogEntry));
             }
         }
         asyncResp->res.jsonValue["Members@odata.count"] = entryCount;
@@ -2203,7 +2203,7 @@
                 nlohmann::json::object_t hostLogEntry;
                 fillHostLoggerEntryJson(std::to_string(skip + i), logEntries[i],
                                         hostLogEntry);
-                logEntryArray.push_back(std::move(hostLogEntry));
+                logEntryArray.emplace_back(std::move(hostLogEntry));
             }
 
             asyncResp->res.jsonValue["Members@odata.count"] = logCount;
@@ -2305,7 +2305,7 @@
 #ifdef BMCWEB_ENABLE_REDFISH_BMC_JOURNAL
     nlohmann::json::object_t journal;
     journal["@odata.id"] = "/redfish/v1/Managers/bmc/LogServices/Journal";
-    logServiceArray.push_back(std::move(journal));
+    logServiceArray.emplace_back(std::move(journal));
 #endif
 
     asyncResp->res.jsonValue["Members@odata.count"] = logServiceArray.size();
@@ -2338,14 +2338,14 @@
                 nlohmann::json::object_t member;
                 member["@odata.id"] =
                     "/redfish/v1/Managers/bmc/LogServices/Dump";
-                logServiceArrayLocal.push_back(std::move(member));
+                logServiceArrayLocal.emplace_back(std::move(member));
             }
             else if (path == "/xyz/openbmc_project/dump/faultlog")
             {
                 nlohmann::json::object_t member;
                 member["@odata.id"] =
                     "/redfish/v1/Managers/bmc/LogServices/FaultLog";
-                logServiceArrayLocal.push_back(std::move(member));
+                logServiceArrayLocal.emplace_back(std::move(member));
             }
         }
 
@@ -2529,7 +2529,7 @@
                 messages::internalError(asyncResp->res);
                 return;
             }
-            logEntryArray.push_back(std::move(bmcJournalLogEntry));
+            logEntryArray.emplace_back(std::move(bmcJournalLogEntry));
         }
         asyncResp->res.jsonValue["Members@odata.count"] = entryCount;
         if (skip + top < entryCount)
@@ -3810,7 +3810,7 @@
         }
 
         nlohmann::json& logEntryArray = aResp->res.jsonValue["Members"];
-        logEntryArray.push_back(std::move(bmcLogEntry));
+        logEntryArray.emplace_back(std::move(bmcLogEntry));
     }
 
     // Return value is always false when querying multiple entries
diff --git a/redfish-core/lib/managers.hpp b/redfish-core/lib/managers.hpp
index 1319eca..819a788 100644
--- a/redfish-core/lib/managers.hpp
+++ b/redfish-core/lib/managers.hpp
@@ -542,7 +542,7 @@
                                     nlohmann::json::object_t step;
                                     step["Target"] = (*keys)[ii];
                                     step["Output"] = (*values)[ii];
-                                    steps.push_back(std::move(step));
+                                    steps.emplace_back(std::move(step));
                                 }
                             }
                         }
@@ -592,7 +592,7 @@
                                      itemCopy)
                                         .to_string());
                                 input["@odata.id"] = std::move(managerUrl);
-                                data.push_back(std::move(input));
+                                data.emplace_back(std::move(input));
                             }
                         }
                         // todo(james): may never happen, but this
diff --git a/redfish-core/lib/metric_report.hpp b/redfish-core/lib/metric_report.hpp
index d12ba10..7ae80d7 100644
--- a/redfish-core/lib/metric_report.hpp
+++ b/redfish-core/lib/metric_report.hpp
@@ -35,7 +35,7 @@
         metricReport["MetricValue"] = std::to_string(sensorValue);
         metricReport["Timestamp"] =
             redfish::time_utils::getDateTimeUintMs(timestamp);
-        metricValues.push_back(std::move(metricReport));
+        metricValues.emplace_back(std::move(metricReport));
     }
 
     return metricValues;
diff --git a/redfish-core/lib/metric_report_definition.hpp b/redfish-core/lib/metric_report_definition.hpp
index b184889..d5d60ed 100644
--- a/redfish-core/lib/metric_report_definition.hpp
+++ b/redfish-core/lib/metric_report_definition.hpp
@@ -87,7 +87,7 @@
             nlohmann::json::object_t metric;
             metric["MetricId"] = metricId;
             metric["MetricProperties"] = nlohmann::json::array_t({metadata});
-            metrics.push_back(std::move(metric));
+            metrics.emplace_back(std::move(metric));
         }
     }
 
diff --git a/redfish-core/lib/pcie.hpp b/redfish-core/lib/pcie.hpp
index f2acecc..4ea2dbc 100644
--- a/redfish-core/lib/pcie.hpp
+++ b/redfish-core/lib/pcie.hpp
@@ -129,7 +129,7 @@
             nlohmann::json::object_t pcieDevice;
             pcieDevice["@odata.id"] = crow::utility::urlFromPieces(
                 "redfish", "v1", "Systems", "system", "PCIeDevices", devName);
-            pcieDeviceList.push_back(std::move(pcieDevice));
+            pcieDeviceList.emplace_back(std::move(pcieDevice));
         }
         asyncResp->res.jsonValue[name + "@odata.count"] = pcieDeviceList.size();
         });
@@ -450,7 +450,7 @@
         pcieFunction["@odata.id"] = crow::utility::urlFromPieces(
             "redfish", "v1", "Systems", "system", "PCIeDevices", pcieDeviceId,
             "PCIeFunctions", std::to_string(functionNum));
-        pcieFunctionList.push_back(std::move(pcieFunction));
+        pcieFunctionList.emplace_back(std::move(pcieFunction));
     }
     res.jsonValue["PCIeFunctions@odata.count"] = pcieFunctionList.size();
 }
diff --git a/redfish-core/lib/power.hpp b/redfish-core/lib/power.hpp
index a0eadf5..3072b89 100644
--- a/redfish-core/lib/power.hpp
+++ b/redfish-core/lib/power.hpp
@@ -221,7 +221,7 @@
                                                 "/Power#/PowerControl/0";
                     powerControl["Name"] = "Chassis Power Control";
                     powerControl["MemberId"] = "0";
-                    tempArray.push_back(std::move(powerControl));
+                    tempArray.emplace_back(std::move(powerControl));
                 }
 
                 nlohmann::json& sensorJson = tempArray.back();
diff --git a/redfish-core/lib/processor.hpp b/redfish-core/lib/processor.hpp
index 205578c..1223875 100644
--- a/redfish-core/lib/processor.hpp
+++ b/redfish-core/lib/processor.hpp
@@ -880,7 +880,7 @@
                 nlohmann::json::object_t turbo;
                 turbo["ActiveCoreCount"] = coreCount;
                 turbo["MaxSpeedMHz"] = turboSpeed;
-                turboArray.push_back(std::move(turbo));
+                turboArray.emplace_back(std::move(turbo));
             }
         }
 
@@ -895,7 +895,7 @@
                 speed["CoreCount"] = coreList.size();
                 speed["CoreIDs"] = coreList;
                 speed["BaseSpeedMHz"] = baseSpeedMhz;
-                baseSpeedArray.push_back(std::move(speed));
+                baseSpeedArray.emplace_back(std::move(speed));
             }
         }
         });
diff --git a/redfish-core/lib/redfish_sessions.hpp b/redfish-core/lib/redfish_sessions.hpp
index e55314a..9fc0832 100644
--- a/redfish-core/lib/redfish_sessions.hpp
+++ b/redfish-core/lib/redfish_sessions.hpp
@@ -128,7 +128,7 @@
         nlohmann::json::object_t session;
         session["@odata.id"] = crow::utility::urlFromPieces(
             "redfish", "v1", "SessionService", "Sessions", *uid);
-        ret.push_back(std::move(session));
+        ret.emplace_back(std::move(session));
     }
     return ret;
 }
diff --git a/redfish-core/lib/roles.hpp b/redfish-core/lib/roles.hpp
index c982347..a3382e8 100644
--- a/redfish-core/lib/roles.hpp
+++ b/redfish-core/lib/roles.hpp
@@ -139,7 +139,7 @@
                     nlohmann::json::object_t member;
                     member["@odata.id"] = crow::utility::urlFromPieces(
                         "redfish", "v1", "AccountService", "Roles", role);
-                    memberArray.push_back(std::move(member));
+                    memberArray.emplace_back(std::move(member));
                 }
             }
             asyncResp->res.jsonValue["Members@odata.count"] =
diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp
index e04eac6..93e8196 100644
--- a/redfish-core/lib/sensors.hpp
+++ b/redfish-core/lib/sensors.hpp
@@ -1134,7 +1134,7 @@
                     redundancy["Status"]["Health"] = health;
                     redundancy["Status"]["State"] = "Enabled";
 
-                    jResp.push_back(std::move(redundancy));
+                    jResp.emplace_back(std::move(redundancy));
                     });
                 });
         }
@@ -2386,7 +2386,7 @@
                             url.set_fragment((""_json_pointer / fieldName / "0")
                                                  .to_string());
                             power["@odata.id"] = std::move(url);
-                            tempArray.push_back(std::move(power));
+                            tempArray.emplace_back(std::move(power));
                         }
                         sensorJson = &(tempArray.back());
                     }
@@ -2415,7 +2415,7 @@
                             "redfish", "v1", "Chassis",
                             sensorsAsyncResp->chassisId,
                             sensorsAsyncResp->chassisSubNode, sensorId);
-                        tempArray.push_back(std::move(member));
+                        tempArray.emplace_back(std::move(member));
                         sensorJson = &(tempArray.back());
                     }
                     else
@@ -2428,7 +2428,7 @@
                         url.set_fragment(
                             (""_json_pointer / fieldName).to_string());
                         member["@odata.id"] = std::move(url);
-                        tempArray.push_back(std::move(member));
+                        tempArray.emplace_back(std::move(member));
                         sensorJson = &(tempArray.back());
                     }
                 }
@@ -2796,7 +2796,7 @@
         member["@odata.id"] = crow::utility::urlFromPieces(
             "redfish", "v1", "Chassis", chassisId, chassisSubNode, id);
 
-        entriesArray.push_back(std::move(member));
+        entriesArray.emplace_back(std::move(member));
     }
 
     asyncResp->res.jsonValue["Members@odata.count"] = entriesArray.size();
diff --git a/redfish-core/lib/storage.hpp b/redfish-core/lib/storage.hpp
index 7182317..63f96b6 100644
--- a/redfish-core/lib/storage.hpp
+++ b/redfish-core/lib/storage.hpp
@@ -105,7 +105,7 @@
             driveJson["@odata.id"] = crow::utility::urlFromPieces(
                 "redfish", "v1", "Systems", "system", "Storage", "1", "Drives",
                 object.filename());
-            driveArray.push_back(std::move(driveJson));
+            driveArray.emplace_back(std::move(driveJson));
         }
 
         count = driveArray.size();
@@ -731,7 +731,7 @@
                     member["@odata.id"] = crow::utility::urlFromPieces(
                         "redfish", "v1", "Chassis", chassisId, "Drives",
                         leafName);
-                    members.push_back(std::move(member));
+                    members.emplace_back(std::move(member));
                     // navigation links will be registered in next patch set
                 }
                 asyncResp->res.jsonValue["Members@odata.count"] = resp.size();
diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp
index 1586ac4..c474d08 100644
--- a/redfish-core/lib/systems.hpp
+++ b/redfish-core/lib/systems.hpp
@@ -2770,14 +2770,14 @@
 
             nlohmann::json::object_t system;
             system["@odata.id"] = "/redfish/v1/Systems/system";
-            ifaceArray.push_back(std::move(system));
+            ifaceArray.emplace_back(std::move(system));
             count = ifaceArray.size();
             if (!ec2)
             {
                 BMCWEB_LOG_DEBUG << "Hypervisor is available";
                 nlohmann::json::object_t hypervisor;
                 hypervisor["@odata.id"] = "/redfish/v1/Systems/hypervisor";
-                ifaceArray.push_back(std::move(hypervisor));
+                ifaceArray.emplace_back(std::move(hypervisor));
                 count = ifaceArray.size();
             }
             });
diff --git a/redfish-core/lib/trigger.hpp b/redfish-core/lib/trigger.hpp
index 7bec478..5fe9678 100644
--- a/redfish-core/lib/trigger.hpp
+++ b/redfish-core/lib/trigger.hpp
@@ -164,7 +164,7 @@
         report["@odata.id"] =
             crow::utility::urlFromPieces("redfish", "v1", "TelemetryService",
                                          "MetricReportDefinitions", reportId);
-        reports.push_back(std::move(report));
+        reports.emplace_back(std::move(report));
     }
 
     return {std::move(reports)};
diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp
index 59b2b3b..b6c0487 100644
--- a/redfish-core/lib/update_service.hpp
+++ b/redfish-core/lib/update_service.hpp
@@ -908,7 +908,7 @@
                 member["@odata.id"] = crow::utility::urlFromPieces(
                     "redfish", "v1", "UpdateService", "FirmwareInventory",
                     swId);
-                members.push_back(std::move(member));
+                members.emplace_back(std::move(member));
                 asyncResp->res.jsonValue["Members@odata.count"] =
                     members.size();
             }
@@ -925,7 +925,7 @@
         nlohmann::json& relatedItem = aResp->res.jsonValue["RelatedItem"];
         nlohmann::json::object_t item;
         item["@odata.id"] = "/redfish/v1/Managers/bmc";
-        relatedItem.push_back(std::move(item));
+        relatedItem.emplace_back(std::move(item));
         aResp->res.jsonValue["RelatedItem@odata.count"] = relatedItem.size();
     }
     else if (purpose == sw_util::biosPurpose)
@@ -933,7 +933,7 @@
         nlohmann::json& relatedItem = aResp->res.jsonValue["RelatedItem"];
         nlohmann::json::object_t item;
         item["@odata.id"] = "/redfish/v1/Systems/system/Bios";
-        relatedItem.push_back(std::move(item));
+        relatedItem.emplace_back(std::move(item));
         aResp->res.jsonValue["RelatedItem@odata.count"] = relatedItem.size();
     }
     else
