Skip to content

Commit

Permalink
Fix format.
Browse files Browse the repository at this point in the history
Signed-off-by: Baris Erdem <baris.erdem@phrase.com>
  • Loading branch information
Baris Erdem committed Aug 23, 2023
1 parent 876309b commit c29cd18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion expr/function_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func TestJsonPath(t *testing.T) {
simpleJson := "{\"employee\":{\"name\":\"sonoo\",\"salary\":56000,\"married\":true}}"
arrayJson := "{\"employees\":[{\"name\":\"Shyam\",\"email\":\"shyamjaiswal@gmail.com\",\"age\":43},{\"name\":\"Bob\",\"email\":\"bob32@gmail.com\",\"age\":42}," +
"{\"name\":\"Jai\",\"email\":\"jai87@gmail.com\",\"age\":44}]}"

assert.Equal(t, "sonoo", JsonPath(simpleJson, "$.employee.name"))
assert.Equal(t, "Bob", JsonPath(arrayJson, "$.employees[1].name"))
assert.Equal(t, []interface{}{"Bob"}, JsonPath(arrayJson, `$.employees[?(@.name == "Bob")].name`))
Expand Down

0 comments on commit c29cd18

Please sign in to comment.