Return custom map from Apex to LWC

PHOTO EMBED

Thu Oct 20 2022 02:32:03 GMT+0000 (Coordinated Universal Time)

Saved by @gbritgs #apex

@AuraEnabled()
public static Map<String, Object> test() { 
        Map<String, Object> scc = new Map<String, Object>();
        
        try {
          //CODE

            scc.put('key', value);
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
        
        return scc;
    }
content_copyCOPY