📅  最后修改于: 2022-03-11 14:52:14.948000             🧑  作者: Mango
// Populate map from SOQL query
Map m = new Map([SELECT Id, Name FROM Account LIMIT 10]);
// After populating the map, iterate through the map entries
for (ID idKey : m.keyset()) {
Account a = m.get(idKey);
System.debug(a);
}