Skip to content

Commit

Permalink
Add info about nested predicates
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmedv committed Jan 6, 2024
1 parent 09c0b34 commit f631fd2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/language-definition.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,17 @@ Braces `{` `}` can be omitted:
filter(tweets, len(.Content) > 240)
```

:::tip
In nested predicates, to access the outer variable, use [variables](#variables).

```expr
filter(posts, {
let post = #;
any(.Comments, .Author == post.Author)
})
```
:::

## String Functions

### trim(str[, chars]) {#trim}
Expand Down

0 comments on commit f631fd2

Please sign in to comment.