开发者

Print_r equivalent in Liquid

开发者 https://www.devze.com 2023-03-09 00:13 出处:网络
In Liquid, how can 开发者_开发问答I find out all the values that a collection contains? Is there a print_r function or similar?

In Liquid, how can 开发者_开发问答I find out all the values that a collection contains? Is there a print_r function or similar?

The example below will return the item title, but I would like to know what other variables item also holds.

item.title

Thanks.


Ah got there in the end! Not quite a print_r, but near enough to see whats available. This prints out the properties in JSON format, so you can see whats in there.

{{item | json}}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号