Get additionalData from Onesignal (Phonegap)
After multiple debugs on my app, I finally found the application. The JSON structure of jsonData is :
jsonData notification: { payload: { title: "YOUR_TITLE", body: "BODY", additionalData: { "YOUR_KEY" : "YOUR_VALUE" },
So to retrieve your data :
JSON.stringify(jsonData.notification.payload.additionalData.<YOUR_KEY>)
Instead of jsonData.payload try with jsonData.OSNotificationPayload
Ex: to access title
jsonData.OSNotificationPayload.title