Skip to content

Commit

Permalink
Support "if" without "else" clause
Browse files Browse the repository at this point in the history
Defaults the else clause to the identity filter "." if an else clause is
missing.

The following two jq programs are considered equivalent:

```
if .foo then
    .foo = "bar"
else
    .
end
```

```
if .foo then
    .foo = "bar"
end
```
  • Loading branch information
Chance Zibolski authored and nicowilliams committed Feb 21, 2019
1 parent 1ef90ac commit 4f6045a
Show file tree
Hide file tree
Showing 4 changed files with 1,030 additions and 995 deletions.
Loading

0 comments on commit 4f6045a

Please sign in to comment.