https://github.com/dbackowski/go-jq
Very simple command-line JSON processor written in Go.
https://github.com/dbackowski/go-jq
golang json processing
Last synced: about 1 month ago
JSON representation
Very simple command-line JSON processor written in Go.
- Host: GitHub
- URL: https://github.com/dbackowski/go-jq
- Owner: dbackowski
- License: mit
- Created: 2022-08-06T09:14:35.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-11-11T16:40:31.000Z (over 3 years ago)
- Last Synced: 2026-02-20T01:58:49.242Z (3 months ago)
- Topics: golang, json, processing
- Language: Go
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### go-jq 
Very simple command-line JSON processor written in Go.
## Usage
* clone the repo
* go to cloned repo directory and run:
```sh
go build
```
```sh
echo "{\"id\":\"123\",\"type\":\"event\",\"repo\":{\"id\":\"2222\",\"type\":\"private\"},\"events\":[{\"id\":\"1\"},{\"id\":\"2\"}],\"test\":[[1,2,3],[4,5,6]]}" | ./go-jq '.repo'
```

```sh
echo "{\"id\":\"123\",\"type\":\"event\",\"repo\":{\"id\":\"2222\",\"type\":\"private\"},\"events\":[{\"id\":\"1\"},{\"id\":\"2\"}],\"test\":[[1,2,3],[4,5,6]]}" | ./go-jq '.repo.type'
```

```sh
echo "{\"id\":\"123\",\"type\":\"event\",\"repo\":{\"id\":\"2222\",\"type\":\"private\"},\"events\":[{\"id\":\"1\"},{\"id\":\"2\"}],\"test\":[[1,2,3],[4,5,6]]}" | ./go-jq '.test[0]'
```
