I'm not able to get the sObject fields value in For loop.
Getting Loop must iterate over collection: SObject
, Can you help me what I am missing here
sObject con = [SELECT Id, firstName, LastName FROM Contact];
for(sObject c : con){
id recid = (id)(c.getSObject('sObject').get('Name'));
string name = String.valueOf(c.getSObject('sObject').get('firstName'));
System.debug(recid + name);
}