go-jmespath icon indicating copy to clipboard operation
go-jmespath copied to clipboard

can get the result If the expression is to determine that the Numbers are equal

Open liov opened this issue 5 years ago • 0 comments

func Test(t *testing.T) {
	user := struct {
		ID int
		Name string
	}{
		ID:1,
		Name:"a",
	}
	users := []interface{}{user}
	res, _ := jmespath.Search("[?ID=='1']", users)
	fmt.Println(res)
}

=== RUN Test [] --- PASS: Test (0.00s) PASS

liov avatar Mar 06 '19 03:03 liov