Skip to content
This repository was archived by the owner on Dec 12, 2025. It is now read-only.
This repository was archived by the owner on Dec 12, 2025. It is now read-only.

Implement map function #72

@qinqon

Description

@qinqon

Sometimes is needed to convert one list into other, usually this is done with map function that convert each list item into different one.

For example constructing port field for all the ethernet interfaces:

Cature
ethernet-ifaces: interfaces.type==ethernet

DesiredState

without JSON

port: "{{ capture.ethernet-ifaces.interfaces -> .name }}"

with JSON (it allos to add more fields to the returned item

port: "{{ capture.ethernet-ifaces.interfaces -> { "name": .name } }}"

This should convert the list of interfaces into a list of bridge/bond ports, if more than one attribute is needed json can be used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions