private BaseCondition parseSimpleCondition(JsonArray jsonArray) {
if (jsonArray.size() % 3 != 0) {
throw new HttpException(422,
"Array condition in where must have size multiple of three ([<field1>, <op1>, <value1>, <field2>, <op2>, <value2>, ...])");
}
BaseCondition[] conditions = new BaseCondition[jsonArray.size() / 3];
for (int i = 0; i < jsonArray.size(); i += 3) {
String field = jsonArray.get(i).getAsString();
String op = jsonArray.get(i + 1).getAsString();
Object value = getJsonObjectValue(jsonArray.get(i + 2));
conditions[i / 3] = Condition.c(field, op, value);
}
return Condition.and(conditions);
}