This is my JSON object :
var EVENT_ID = {
"Enable Popup Blocker": "Sol_EnablePopupBlocker_IE",
"Disable Script Debug": "Sol_DisableScriptDebugger_IE",
"Clear History": "Sol_ClearHistory_IE",
"Reset Settings": "Reset_InternetExplorer_Settings_SA",
"Profile Issue": "Fix_Outlook_Profile_SA",
"Send Receive": "Fix_Send_Receive_Errors_Outlook_SA",
"Search Issue": "Fix_Search_Outlook_SA"
};
I am trying to access the JSON object value with keys, which has spaces as shown below
var eventID = JSON.stringify(req.body.result.parameters.solution);
var aptEventName = EVENT_ID[eventID];
eventID value is "Profile Issue"
When I log my aptEventName variable, it throws values as undefined. Can anyone please tell me, where I am going wrong?
EVENT_ID[req.body.result.parameters.solution]