flip Modifier

Swaps the keys with their corresponding values. The old switcharoo.

chicken: nuggets
nuggets: Denver
{{ favorites }}
My favorite {{ key }} is {{ value }}.
{{ /favorites }}
{{ favorites | flip }}
My favorite {{ key }} is {{ value }}.
{{ /favorites }}
My favorite chicken is nuggets.
My favorite nuggets is Denver
My favorite nuggets is chicken
My favorite Denver is nuggets.

It's a weird example with bad grammer. Hopefully you're okay with it.

Docs feedback

Submit improvements, related content, or suggestions through Github.

Betterify this page →