Inline Sample (JSON)¶
Data File¶
{
"key1": "value1",
"key2": [
"list item 1",
"list item 2",
"list item 3"
],
"nested-list": [
["a", "b", "c"],
["A", "B", "C"]
],
"mapping-series": [
{"cola": "a", "colb": "b", "colc": "c"},
{"cola": "A", "colb": "B", "colc": "C"}
]
}
Template File¶
Individual Item
~~~~~~~~~~~~~~~
{{ data['key1'] }}
List of Items
~~~~~~~~~~~~~
{% for item in data['key2'] %}
- {{item}}
{% endfor %}
Loading the Template¶
.. datatemplate:json::
:source: sample.json
Individual Item
~~~~~~~~~~~~~~~
{{ data['key1'] }}
List of Items
~~~~~~~~~~~~~
{% for item in data['key2'] %}
- {{item}}
{% endfor %}