The first value obtained after filtering is abnormal
llm163520 opened this issue · 1 comments
llm163520 commented
public static void main(String[] args){
String json = "{"viewInfo":{"att1DtoList":[{"rowNo":1,"generalMonth":"1"}]}}";
DocumentContext documentContext = JsonPath.using(Configuration
.builder()
.mappingProvider(new JacksonMappingProvider())
.jsonProvider(new JacksonJsonProvider())
.build()).parse(json);
String generalMonth = documentContext.read("$.viewInfo.att1DtoList[?(@.rowNo == 1)].[0]['generalMonth']").toString();
//Actual result:[]
//Desired result:"1"
}