gval icon indicating copy to clipboard operation
gval copied to clipboard

no error return when compare with two data which with different type

Open willishen opened this issue 3 years ago • 1 comments

willishen avatar Jan 12 '22 09:01 willishen

like the following code:

dataMap := map[string]interface{}{"key1": 1, "data": map[string]interface{}{"name": "will", "age": 23}} val, err := gval.Evaluate("$.data > 2",dataMap , gJsonpath.Language()) if err != nil { fmt.Println(err) return } fmt.Println("parse success, ", val)

The jsonpath expression get a map, when a map compare with a number, I expect return an error. but the result is "true nil"

willishen avatar Jan 12 '22 09:01 willishen