Hello,
It is possible to get a property with a long path using JSON::getProperty("") ?
For example:
json.getProperty(“Synth.Keyboard.Key.Color”);
{
"Synth": {
"Keyboard": {
"Key": {
"Color": [255, 255, 170, 1.0]
}
}
}
}
At the moment I’m doing this this way:
static Array<var>* getArray(var *json, const String& path) {
StringArray arr;
arr.addTokens(path, ".", "\"");
auto object = *json;
for (auto &s : arr) {
object = object.getProperty(s, var());
}
return object.getArray();
}