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

--

--

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