Skip to content

Instantly share code, notes, and snippets.

@jalons
Created February 14, 2014 16:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jalons/aa1ee0a57d0baaaae977 to your computer and use it in GitHub Desktop.
Save jalons/aa1ee0a57d0baaaae977 to your computer and use it in GitHub Desktop.
{% set baz = {
'bar': {
'baz': 'abc'
},
'bar2': {
'baz': 'xyz'
},
}.get(grains['foo']) %}
@dlanderson
Copy link

{%- set baz = {
'bar': { 'baz': 'abc' },
'bar2': { 'baz': 'abc' }
}['bar'] -%}

{{ baz }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment