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

Description
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.