-
-
Save thedevsaddam/e11a44de73fe4ae73f54dc1f25501981 to your computer and use it in GitHub Desktop.
access data using Find method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log" | |
"github.com/thedevsaddam/gojsonq" | |
) | |
func main() { | |
jq := gojsonq.New().File("./sample-data.json") | |
res := jq.Find("vendor.items.[1].name") | |
if jq.Error() != nil { | |
log.Fatal(jq.Errors()) | |
} | |
fmt.Println(res) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment