Fix list to dict example (#73213)

##### SUMMARY
<!--- Your description here -->
single_list must be transformed to a list of pairs before feeding it into dict()

##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr
pull/73245/head
Gregor Riepl 4 years ago committed by GitHub
parent e2308ed6e3
commit 403a3b90b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -198,7 +198,7 @@ These example produces ``{"a": "b", "c": "d"}``
vars:
single_list: [ 'a', 'b', 'c', 'd' ]
mydict: "{{ dict(single_list) | slice(2) | list }}"
mydict: "{{ dict(single_list | slice(2) | list) }}"
.. code-block:: YAML+Jinja

Loading…
Cancel
Save