I need document write about Liquid variable.
I read following document, but there is not enough information for me.
https://shopify.dev/docs/api/liquid/basics#referencing-handles
Where is it write about more detail about Liquid variable?
I’d like to know detail about variable key in square bracket like var["key"].
- Is it possible to use backslash escape like
var["key-with-quote\""]?
The Ruby library liquid gem, it occur syntax error when using backslash escape.
Is this behavior a bug or specification?
- Some characters have special meaning in the variable key?
The Ruby library liquid gem, it handle item["key]"] as item[key].
I expected the key "key]" is literal string, but library handle as variable key.
Is this behavior a bug or specification?
The Ruby library liquid gem(v5.4.0), it handle item["item['key']"] as item[item["key"]].
But unreleased version (master branch) handle item["item['key']"] as item["item['key']"].
I expected the key "item['key']" is literal string, but the library of released version handle as variable item['key'].
Which behavior is right?
I also posted to GitHub Issue.