class JSONUtils {

    public static ArrayNode filterJsonNodeWithPaths(JsonNode jsonNode, List<String> filterPaths) {
        Configuration configuration = Configuration.defaultConfiguration().addOptions(Option.DEFAULT_PATH_LEAF_TO_NULL,
                Option.SUPPRESS_EXCEPTIONS);
        ObjectMapper mapper = new ObjectMapper(new JsonFactory());
        DocumentContext jsonDocument = JsonPath.using(configuration).parse(jsonNode.toString());
        ArrayNode filteredNode = mapper.createArrayNode();

        for(String path : filterPaths) {
            Object value = jsonDocument.read(path);
            filteredNode.add(mapper.convertValue(value, JsonNode.class));
        }
        return filteredNode;
    }

}