Skip to content

Commit

Permalink
Add examples
Browse files Browse the repository at this point in the history
  • Loading branch information
tmuth authored Apr 24, 2020
1 parent 93ba342 commit 3777cc7
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
# jq-custom-search
jq Custom Search command wrapper for Splunk

## Installation
You must install the jq binary first

## Examples
Simple JSON Reformat
```
| makeresults count=1
| eval json="{\"fruit\":{\"name\":\"apple\",\"color\":\"green\",\"price\":1.20}}"
| jq input=json output=json_new args="-r" split="" filter=".fruit"
```
Extract Just a value based on a key
```
| makeresults count=1
| eval json="{\"fruit\":{\"name\":\"apple\",\"color\":\"green\",\"price\":1.20}}"
| jq input=json output=json_new args="-r" split="" filter=".fruit.color"
```

0 comments on commit 3777cc7

Please sign in to comment.