Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Print_r equivalent in Liquid

Tags:

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.

like image 646
addedlovely Avatar asked May 30 '11 09:05

addedlovely


Video Answer


1 Answers

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}}
like image 130
addedlovely Avatar answered Sep 21 '22 19:09

addedlovely