@Test public void computePathFunction() { String content = "{ 'a' : 'X', 'b' : 'Z' }"; String query = "$.length()"; // $.a.length() does not work; need to understand Object result = JsonPathUtils.computePathFunction(query, content); assertThat(result, equalTo(2)); }
JsonPathUtils.computePathFunction(extraction.getFilter(), jpResult.getSuffix()); if (result != null) { if (result instanceof Integer) {