Skip to Content

TheBlogReaders.com

Salesforce.com, PHP, MySQL, Javascript, Ajax, Htacces

Iterating Map using for loop in Apex Class

Closed

You can user keyset() method to iterate over keys in map to fetch values
Apex Class:

Map fieldList = new Map{‘Name__c’=>’Name’, ‘Age__C’=>’Age’};
for (String fieldName : fieldList.keySet()){
system.debug(fieldName);
}

(3432)

Previous
Next