Skip to content

rotblauer/gfilter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gfilter

Filter JSON lines with GJSON query syntax.

$ go install .

$ gfilter --help
Usage of gfilter:
  -match-all string
        match all of these properties (gjson syntax, comma separated queries)
  -match-any string
        match any of these properties (gjson syntax, comma separated queries)
  -match-none string
        match none of these properties (gjson syntax, comma separated queries)

$ cat <<EOF | gfilter --match-all '#(age>42),#(name.last=="Smith")'
{"name":{"first":"Janet","last":"Prichard"},"age":47}
{"name":{"first":"Carol","last":"Smith"},"age":49}
{"name":{"first":"John","last":"Smith"},"age":42}
{"name":{"first":"Lisa","last":"Smith"},"age":49}
EOF
{"name":{"first":"Carol","last":"Smith"},"age":49}
{"name":{"first":"Lisa","last":"Smith"},"age":49}

About

Filter JSON lines with GJSON query syntax.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages