According to Shopify's docs, Liquid allows accessing key/value pairs in for
loops, like so:
This does not currently work in BC's Liquid renderer; the output of the key/value tags are blank. Here is an example using the always-available this.urlculture
global object:
{% for obj in this.urlculture %}
{{ obj | json }}Key: {{ obj[0] }}
Value: {{ obj[1] }}
{% endfor %}
Here's the output I get:
{ "Key": "moduleName", "Value": "urlculture" } Key: Value: { "Key": "culture", "Value": "EN" } Key: Value:
Accessing them by name (like {{ obj.Key }}
) also fails.
Am I missing something, or is this just not implemented yet?
Also, Why isn't the nice code formatting shown in this post editor visible in the actual post?