-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add array_filter expression function
- Loading branch information
Showing
2 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "array_filter", | ||
"type": "function", | ||
"description": "Returns an array with only the items for which the expression evaluates to true.", | ||
"arguments": [ | ||
{"arg":"array","description":"an array"}, | ||
{"arg":"expression","description":"an expression to evaluate on each item. The variable `@element` will be replaced by the current value."} | ||
], | ||
"examples": [ | ||
{ "expression": "array_filter(array(1,2,3),@element < 3)", "returns":"array: [1, 2]"} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters