function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rakin MohammedRakin Mohammed 

How to merge two maps into a csv file?

Hi guys. I have written a function to retrieve dependent multipicklist metadata that is stored, returning a Map of an Object (picklist label), and a String List. 
The object returned is initialized as follows:
Map<Object,List<String>> dependentPicklistValues
My first function call would return the following: 
{A=(x,y,z)}
My second function all would return the following:
{X=(l,m,n), Y=(o,p), Z=(q,r,s,t)}

I need to figure out a way to merge or iterate through these two maps and create a csv, preferably a csv file, that looks like the following
A | x | l
A | x | m

A | x | n

A | y | o 

A| y | p 
A |z | q  ... etc etc..

Thank you for all your help in advance!