Guest User

Untitled

a guest
Feb 1st, 2018
337
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. Map<String,String> test = new Map<String,String>();
  2. Map<String,String> sample = new Map<String,String>();
  3.  
  4. List<String> orderList = new List<String>();
  5.  
  6. for(String t :sample.keySet()){
  7. String tt = sample.get(t);
  8. for(String s :test.keySet()){
  9. String ss = test.get(s);
  10. if(tt.equals(s)){
  11. orderList.add(ss);
  12. System.debug('OrderList:::'+orderList);
  13. }
  14. }
  15. }
  16.  
  17. Response : Kalyan K
  18. Response : Kalyan K, Kalyank@tcs.com
  19. Response : Kalyan K, Kalyank@tcs.com, Attended
  20. Response : Kalyan K, Kalyank@tcs.com, Attended,Chennai
  21. Response : Kalyan K, Kalyank@tcs.com, Attended, Chennai,Tamilnadu
  22. Response : Kalyan K, Kalyank@tcs.com, Attended, Chennai, Tamilnadu, India
  23. Response : Kalyan K, Kalyank@tcs.com, Attended, Chennai, Tamilnadu, India, 9857455552
  24.  
  25. how can I separate each value for assigning to the other object like below
  26.  
  27. Lead le = new Lead();
  28. le.LastName = ss;// here map kalyan k
  29. le.LightiningEd__AdobeEmail__c = ss; // here map Kalyank@tcs.com
  30. le.Status = ss; //here map Attended
  31. le.LightiningEd__City__c = ss; // here map Chennai
  32. le.LightiningEd__State__c = ss; //here map Tamilnadu
  33. le.LightiningEd__Country__c = ss; here map india
  34. le.MobilePhone = ss; //here map 9857455552
  35. LeadList.add(le);
Add Comment
Please, Sign In to add comment