Hello beautiful people,
I have a scenario where I am defining a Map with string key and a list. Now, I want to put values in a list one by one and also display them using the single Key. Example code -
Map<string,List<Account>> accountMap = new Map<string,List<Account>>();
//How to insert values. I am using this but no luck-
for(Account acc = [Select Id, Name from Account]){
accountMap(acc.Id,accList)
}
//Lets say we have data. How to display any **specific** value from the middle of the list. I am using this but no luck-
AccountList.get(id).get(3);
Please help.