Skip to content

Commit b9da3b1

Browse files
Document depth parameter on flatten modifier (#1349)
1 parent e4f49ee commit b9da3b1

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

content/collections/modifiers/flatten.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,20 @@ ingredients:
3131
- onion
3232
- chicken
3333
```
34+
35+
You can optionally pass a `depth` parameter to the `flatten` modifier, allowing you to specify how deeply nested arrays should be flattened.
36+
37+
```yaml
38+
-
39+
- garlic
40+
- cumin
41+
- ginger
42+
- turmeric
43+
- paprika
44+
- curry powder
45+
-
46+
- tomatoes
47+
- onion
48+
-
49+
- chicken
50+
```

0 commit comments

Comments
 (0)