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

[Action required] Your RSS.app Trial has Expired — Sat Dec 25 2021

React Native Basics: Geolocation

How to access another super domain url in Cypress while “chromeWebSecurity” is turned on

[Action required] Your RSS.app Trial has Expired — Sun Nov 14 2021

A Complete Beginner’s Guide to React

Building A Browser Game Part 4: Welcome to the Function Factory

Five tips when using React hooks

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

How to use the lightning-formatted-email, lightning-formatted-number, lightning-formatted-phone…

Lightning Web Component with Omniscripts

Salesforce: How I’d Handle Apex Classes

More Dynamic Way to Schedule a Salesforce Flow with Invocable Schedule Flow