I have a Map<string, Map<String, String>> map1
containing the object as the outer key and the value contains field api name and the label (the label is something which i want to use and not the actual field label)
for example:
{
opportunity={Name=Name information,
StageName=Stage Name Details,
Channel__c=channel}
}.
I have another Map<string, Map<String, Object>> map2
containing the object as the outer key and the value contains field api name and its value. for example:
{opportunity={Name= new opportunity, stageName= understand customer}.
Now i want to merge the two maps so that map2's value contains field label instead of field api name by fetching the field label from map1 and the map should look like the following:
Map<string , Map<String, String>> map3-->
{
opportunity={
Name information= new opportunity,
stage Name Details= understand customer
}
Also, map1
has the label Channel__c=channel
but this channel__c
field is not present in map2. Hence map3 should contain channel=''
.
i need to display map3 in a table format with the field label as the column name and since channel__c
is not present in map2, channel column should contain its value as blank in the table.
Is this possible?