Convert JSON List to Collection Variable in Salesforce Flow

{
"colors": [
{
"color": "black",
"category": "hue",
"type": "primary"
},
{
"color": "red",
"category": "hue",
"type": "primary"
},
{
"color": "blue",
"category": "hue",
"type": "primary"
},
{
"color": "yellow",
"category": "hue",
"type": "primary"
},
{
"color": "green",
"category": "hue",
"type": "secondary"
}
]
}
Image 1: JSON example in Text Template variable
Image 2: MultipleJSONParser to parse colors field
Image 3: ColorsObj Text Variable to Store Colors field JSON
Image 4: Store Field01 result to ColorsObj variable
Image 5: Result when I tried to debug
Image 6: Create a Collection Text Variable to store the converted value
Image 7: add Invocable action that you installed in point a. and add ColorsObjs as input variable, and store it to CollectionOfColors (collection text variable that we created in Image 6)
Image 8: Loop ColectionOfColors variable
Image 9: Parse the each JSON
Image 10: Assign parsed result to Collection Variables
Image 11: Final Flow
Image 12: Final debug result

--

--

--

A dots connector. open for part time, Email: munawirrahman@gmail.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Discord x Stripe : Simple payment integration ⚡️

Using Power Query to convert Repeating Rows to Columns

Transform Repeating Rows to a Column format table

Why It’s a Good Idea to Learn React Native?

React Argon Material-UI — Free Template

React Argon Material-UI — Free Template by Creative-Tim

Building up a Facial Detection App with the help of Tensorflow.js

Closures in JavaScript

Animated Search View in React Native

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Munawirrahman

Munawirrahman

A dots connector. open for part time, Email: munawirrahman@gmail.com

More from Medium

Pinpoint Map Location in Salesforce Flow (with Leaflet JS)

What is apex programming?

How to deploy the LWC component on a Local Development Server

How to deploy the LWC component on a Local Development Server

Write a trigger on Contact to Prevent the user to create duplicate Contact based on Phone if Phone…