Transforms raw csv text into JSON object.
{% capture raw_csv %} name,total #1004,29.99 #1005,59.99 {% endcapture %} {% assign orders = raw_csv | parse_csv %} {{ orders | log }}
Above snippet generates below output:
[ { "name": "#1004", "total": 29.99 }, { "name": "#1005", "total": 59.99 } ]
Last updated 1 year ago