Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flatten() builtin #672

Closed
antonmedv opened this issue Jun 17, 2024 · 3 comments · Fixed by #684
Closed

Add flatten() builtin #672

antonmedv opened this issue Jun 17, 2024 · 3 comments · Fixed by #684
Labels

Comments

@antonmedv
Copy link
Member

Add flatten builtin.

flatten([["a", "b"], [1, 2]]) == ["a", "b", 1, 2]
@OlgaNovg
Copy link
Contributor

flatten([["a", "b"], [1, 2, [3, 4]]]) == ["a", "b", 1, 2, 3, 4] or ["a", "b", 1, 2, [3, 4]] ?

@antonmedv
Copy link
Member Author

["a", "b", 1, 2, 3, 4] Lets make it to all nested arrays.

@vmihailenco
Copy link

Would be nice if the function also supports maps, e.g. just like VRL https://vector.dev/docs/reference/vrl/functions/#flatten

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants