I use Jackson to extract Json as follows:
WSRequest request = WS.url("https://www.someurl.com");
Promise<WSResponse> promise = request.get();
Promise<JsonNode> jsonPromise = promise.map(s -> {return s.asJson();});
JsonNode jsonNode = jsonPromise.get(1000);
So far so good. Now I have a jsonNode, which is an array of many Json objects. I would like to save only Json objects that contain a specific field: value as saving all objects using "courseLevel": "basic". How can I do it? Is ObjectMapper the right way or some better way to filter objects in an array and save only those who have a specific field / value? Any suggestion?
source
share