I am new to python and was wondering in the below python code how to add a variable conditionally.
requestBody = json.dumps({"accountId":accountId,
"emailSubject":customData.emailSubject,
"emailBlurb":customData.emailBlurb,
"customFields":customFields,
"status":customData.status,
"messageLock":customData.messageLock})
Like for example i want "custom"Fields:customFields only to be included if its not null else not.How to do this??