Skip to content

Commit

Permalink
Make boolean operators more visible
Browse files Browse the repository at this point in the history
  • Loading branch information
larsga committed Jan 26, 2019
1 parent a8f352b commit 9ed4436
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ Here is an example transform:
| `// <anything up to end of line>` | Comment |
| `{ <key> : <expr> }` | [Object constructor](tutorial.md#json-construction) |
| `{ <key> : <expr>, * : . }` | Specify one key, [copy rest of input](tutorial.md#object-matching) |
| `5 * 7 + 23.2` | Arithmetic operations |
| `7 < 5` | Comparators |
| `7 < 5 and .foo == "yes"` | Boolean operators |

## Using the library

Expand Down
6 changes: 5 additions & 1 deletion tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,11 @@ and get
```

You can also combine boolean values with `and` and `or`. `not` is a
function.
function. So you can write a boolean expression as:

```
.foo.bar > 2 and not(contains(.baz, ["george", "harry"]))
```

## Object matching

Expand Down

0 comments on commit 9ed4436

Please sign in to comment.