Open dankristensen opened 1 year ago
I have created this unit test, that works when using same data on try.jsonata.org. But it currently fails using JSONata4Java
public void shouldEvaluateJsonataExpression() throws Exception { ObjectMapper objectMapper = DatabindCodec.mapper(); JsonNode jsonNode = objectMapper.readTree("[[\"A\",\"B\",\"C\"],[\"AA\",\"BB\",\"CC\"]]"); Expressions expressions = Expressions.parse("$.[$[0],$[1]]"); JsonNode evaluatedNode = expressions.evaluate(jsonNode); assertThat(evaluatedNode.toString(), equalTo("[[\"A\",\"B\"],[\"AA\",\"BB\"]]")); }
Any clues on what is wrong
I think there is a bug with the $. before the array. Without that we get the same as try.jsonata.org. I'll try to look into this.
I have created this unit test, that works when using same data on try.jsonata.org. But it currently fails using JSONata4Java
Any clues on what is wrong