json::JObject added method putArray

This commit is contained in:
MihailRis
2023-12-01 16:56:07 +03:00
parent c8a283c645
commit 647662b0d3
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -295,6 +295,12 @@ JObject& JObject::put(string key, bool value){
return *this;
}
JArray& JObject::putArray(std::string key) {
JArray* arr = new JArray();
put(key, arr);
return *arr;
}
bool JObject::has(string key) {
return map.find(key) != map.end();
}