get object field in apex code example
Example: apex get object fields
Map<String, Schema.SObjectField> fieldMap = Schema.SObjectType.<Object API Name>.fields.getMap();
Map<String, Schema.SObjectField> fieldMap = Schema.SObjectType.<Object API Name>.fields.getMap();