public static void main(String[] args) {
JSonArray result = new JSonArray();
for (int i = 0; i < 10; i++) {
JSonObject jsonObject = new JSonObject();
jsonObject.put("price", i);
jsonObject.put("name", i);
result.add(jsonObject);
}
JSonArray objects = result.stream()
.filter(iter -> ((JSONObject) iter).getInteger("price") == 1 || ((JSONObject) iter).getInteger("name") % 2 == 0)
.sorted(Comparator.comparing(iter -> ((JSONObject) iter).getInteger("price")).reversed())
.collect(Collectors.toCollection(JSONArray::new));
System.out.println(objects.toJSonString());
}