Skip to content

Share part of a map using YAML sintax #54

@pmuzzetto

Description

@pmuzzetto

I would like to know if there is a way to merge only a part of a map into another.
For example I want to merge the map common in anotherlist without the key 'red'.
common: &common
'blue': 'blue'
'yellow': 'yellow'
'red': 'red'

anotherlist:
<<: *common

I know that to merge one or more maps I can use the merge key type '<<', but I don't know how I can exclude a part of the common map from the merge.

Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions