How to convert array values to string separated by commas


1 comment

  • Orion Abrams Technical Implementation Consultant

    Hi Chris,

    The below handlebar should do what you need. If this is a subarray, you also need to wrap an {{#each line_items}} around it. Note that whatever field you're mapping this to is going to get one of these for every line item, and your final result would be all of them concatenated together. It seems like this should maybe be done with a JS hook to store the value in a new field, to easily be mapped 1:1, instead of handlebar statement.

    {{#each properties}}{{{name}}}:{{{value}}}{{#unless @last}},{{/unless}}{{/each}}


Please sign in to leave a comment.