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

Would like to specify that a list of lists should be flattened #339

Open
acampove opened this issue Oct 5, 2024 · 1 comment
Open

Would like to specify that a list of lists should be flattened #339

acampove opened this issue Oct 5, 2024 · 1 comment

Comments

@acampove
Copy link

acampove commented Oct 5, 2024

Hi,

I have a file like:

mammals: &mammals
  - lion
  - tiger
  - elephant

reptiles: &reptiles
  - snake
  - lizard
  - crocodile

animals:
  - *mammals
  - *reptiles

In the example above, animals is not a single list, but two and we would have to flatten this in the code. It would be good if we could somehow specify that these lists have to be flattened, e.g. with - **mammals.

@UnePierre
Copy link

Another syntax could follow that for appending maps, like:

mammals: &mammals
  - lion
  - tiger
  - elephant

reptiles: &reptiles
  - snake
  - lizard
  - crocodile

animals:
  <<:
    - *mammals
    - *reptiles

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

No branches or pull requests

2 participants