JSON Array parsing | Community
Skip to main content
Rohan_Chauhan
Level 1
December 19, 2019
Question

JSON Array parsing

  • December 19, 2019
  • 1 reply
  • 1997 views

Hi, I am new to Marketo but knows velocity properly.

I have product jsonArray. Each json Object inside array has field name "Id", "name", "size" "color", "price". I would like to show product name and price, group by Color.

The jsonArray is a custom object., So I can show the value using {{my.jsonPayload}}. I can't parse and  process the Json payload, in velocity. 

Can anyone share some sample code, please?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

SanfordWhiteman
Level 10
December 19, 2019

If it's a Custom Object, you can't be outputting it as {{my.token}}. That's a Program-level token.

Please be precise about how you're storing the data and provide an actual example JSON value, formatted using the syntax highlighter.