You need to sign in to do that
Don't have an account?
Ashu sharma 38
how to merge two maps and create third map
Hi,
As I am creating two maps now I want to create the third map in which i have to put the values from 1st and 2nd Map.
Thanks
As I am creating two maps now I want to create the third map in which i have to put the values from 1st and 2nd Map.
Thanks
See this code example this will help you.
If you found it useful please appreciate my efforts and mark it as the best answer.
LinkedIn: https://www.linkedin.com/in/soyab-hussain-b380b1194/
Regards
Soyab
Thanks for reply..
As i need to change the key value pair from below code:
map<id,set<id>> programTermAndprogramCodeMap=new map<id,set<id>>();
for(Program_Session__c ps:programTermListWithProgramCode){
set<id> programCodeProgramTerm=new set<id>();
programCodeProgramTerm.add(ps.Program__r.Program_Code__c);
// programCodeProgramTerm.add(ps.id);
programTermAndprogramCodeMap.put(programCodeProgramTerm,ps.Id);
// programTermAndprogramCodeMap.put(ps.id,programCodeProgramTerm); /*Program term and Program code */
system.debug('programTermAndprogramCodeMap' +programTermAndprogramCodeMap);
}
I need to change as Programe code(key) and Program term(value)..any suggestions