Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

dust.js object print

Tags:

dust.js

Is it possible to print an object without knowing it's attributes? I am trying to debug why attributes of a certain object are not accessible in a view.

{#object}
  {attr}
{/object}

In case of above example nothing gets printed instead of attr value.

like image 862
Me Unagi Avatar asked Jun 26 '26 08:06

Me Unagi


1 Answers

Try using the contextDump helper.

{#object}
  {@contextDump/}
{/object}

Here's an example: http://jsfiddle.net/smfoote/8UfJL/

like image 199
smfoote Avatar answered Jul 01 '26 14:07

smfoote



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!