Skip to content

Instantly share code, notes, and snippets.

@thedevsaddam
Created July 10, 2018 17:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thedevsaddam/35e9c19f33077562353082a714767445 to your computer and use it in GitHub Desktop.
Save thedevsaddam/35e9c19f33077562353082a714767445 to your computer and use it in GitHub Desktop.
Usages of nested Where query
package main
import (
"fmt"
"github.com/thedevsaddam/gojsonq"
)
func main() {
jq := gojsonq.New().File("./data.json")
res := jq.From("users").WhereEqual("name.first", "John").Get()
fmt.Println(res) //output: [map[id:1 name:map[first:John last:Ramboo]] map[id:3 name:map[first:John last:Doe]]]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment