About this question
In my custom object, I have two fields Name__c and QuestionString__c
I am trying to initialize a map with Name__c as key and QuestionString__c as a value from a SOQL.
Map
I tried the above but I get the error as
Invalid initializer type List found for Map: expected a Map with the same key and value types, or a valid SObject List
Can someone tell me if it is possible to initialize a map directly (without "Id") from SOQL?