final JsonArray newObjects = Json.createArray();
values.forEach(new ListIterator<JsonArray>() {
@Override
public void call(int idx, JsonArray newValue) {
oldObjects.push(get(index + idx));
newObjects.push(JsonSerializer.deserializeObject(newValue, model.objects));
JsonArray oldValue = snapshot.getArray(index + idx);
snapshot.remove(index + idx);
snapshot.insert(index + idx++, newValue);
model.addOrRemoveParent(oldValue, id, false);
model.addOrRemoveParent(newValue, id, true);