1

Is it possible to dump the entire contents of a var in an isml template.

For example this gives me output:

${payment.paymentMethod}

But if I want to debug the entire 'payment' object:

${payment}

The result is: [object Object]

2

You can use as below in script:

<isscript>
    out.print( JSON.stringify(payment) );
</isscript>

This will stringify the object and show string as below:

"{"paymentName":"name_value","paymentMethod":"method_name"}"

instead of [object Object]

  • 1
    thanks that works. I also discovered that for more detailed debugging I can use the debugger tool in VS Code to create break points to see the value of all objects – Alan A Aug 7 at 9:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.