void FromJSObject(std::vector<std::map<gcString, gcString>> &args, JSObjHandle& arg) { if (arg->isArray() == false) return; for (int x=0; x<arg->getArrayLength(); x++) { JSObjHandle a = arg->getValue(x); std::map<gcString, gcString> m; FromJSObject(m, a); args.push_back(m); } }
void FromJSObject(std::map<gcString, gcString> &map, JSObjHandle& arg) { if (arg->isArray() == false && arg->isObject() == false) return; for (int y=0; y<arg->getNumberOfKeys(); y++) { char key[255] = {0}; gcString val; arg->getKey(y, key, 255); try { JSObjHandle jObj = arg->getValue(key); FromJSObject(val, jObj); map[gcString(key)] = val; } catch (...) // TODO { } } }