Guest User

Untitled

a guest
Feb 19th, 2018
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. Hi All,
  2.  
  3. I'm trying to filter the below mentioned response like below please check it once
  4.  
  5. Map<String,String> customsettingValues = new Map<String,String>();
  6. Map<String,String> SelectedValues = new Map<String,String>();
  7. Set<String> orderList1 = new Set<String>();
  8. for(String firstKey : customsettingValues.keySet()){
  9. String firstValue = customsettingValues.get(firstKey);
  10. for(String secondKey : SelectedValues.keySet()){
  11. String secondValue = SelectedValues.get(secondKey);
  12. if(firstValue.equals(secondKey)){
  13.  
  14. orderList1.add(secondValue);
  15. System.debug('orderList1:::---------'+orderList1);
  16.  
  17. }
  18. }
  19. }
  20.  
  21. I got the Response Like below for the above code
  22.  
  23. orderList1:::---------{chandra}
  24. orderList1:::---------{chandraiii@gmail.com,chandra}
  25. orderList1:::---------{Not Attended,chandraiii@gmail.com,chandra}
  26. orderList1:::---------{vizag,Not Attended,chandraiii@gmail.com,chandra}
  27. orderList1:::---------{ap,vizag,Not Attended,chandraiii@gmail.com,chandra}
  28. orderList1:::---------{Ind,ap,vizag,Not Attended,chandraiii@gmail.com,chandra}
  29. orderList1:::---------{88888888888,Ind,ap,vizag,Not Attended,chandraiii@gmail.com,chandra}
  30.  
  31. How to change above response like below
  32.  
  33. orderList1:::---------{chandra}
  34. orderList1:::---------{chandraiii@gmail.com}
  35. orderList1:::---------{Not Attended}
  36. orderList1:::---------{vizag}
  37. orderList1:::---------{ap}
  38. orderList1:::---------{Ind}
  39. orderList1:::---------{88888888888}
  40.  
  41. If anybody having idea please let me know
  42.  
  43. Thanks In Advance
  44. Basha
Add Comment
Please, Sign In to add comment