JSON Array parsing

Level 1

JSON Array parsing

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?

Tags (1)
Level 10 - Community Moderator

Re: JSON Array parsing

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.