Skip to content

Add support for Result instance

Compare
Choose a tag to compare
@thedevsaddam thedevsaddam released this 23 Sep 19:26
· 12 commits to master since this release
ab3beb6

The Result instance will return different methods to get static type.

const json = `{"name":{"first":"Tom","last":"Hanks"},"age":61}`
result, err := gojsonq.New().JSONString(json).FindR("name.first")
if err != nil {
	log.Fatal(err)
}
name, _ := result.String()
fmt.Println(name)