// find array node, to append new config
if (node.get(key) != null && !node.get(key).isArray()) {
node.remove(key);
}
ArrayNode array = (ArrayNode) node.get(key);
if (array == null) { // if not, create one
array = node.arrayNode();
node.put(key, array);
}
if (! (array instanceof ArrayNode) ) {
throw new MException(key + " is not an array");
}
// create new object node in array
ObjectNode out = array.objectNode();
array.add(out);
return new JsonConfig(key, this, out);
}