@ Override public JsonNode visit ( JmesPathAndExpression andExpression , JsonNode input ) throws InvalidTypeException { JsonNode lhsNode = andExpression . getLhsExpr ( ) . accept ( this , input ) ; JsonNode rhsNode = andExpression . getRhsExpr ( ) . accept ( this , input ) ; if ( lhsNode == BooleanNode . TRUE ) { return rhsNode ; } else { return lhsNode ; } }
And expression will evaluate to either the left expression or the right expression . If the expression on the left hand side is a truth - like value then the value on the right hand side is returned . Otherwise the result of the expression on the left hand side is returned .