{{ variable | json }} alternative for order printer

Hi,

Im trying to add lots of extra details onto our packing slips but cant find how to display certain variables. For instance, I want to show the commodity codes for each item and I also want to show the purchasing company’s VAT number or Tax ID but I can’t find a reference to these anywhere in the liquid reference.

in the theme files Im able to do something like this:


and its lists all the elements of the object and their values to the console.

If I try this code within the order printer templates I get an error that I cant use script tags in the templates.

If I use it without the script tags:

{{ line_item | json }}

It just says:

Liquid error: internal

How can I get to see all the different elements of each object used in packing slips so I don’t have to come on here and ask for each one specifically?

Thanks