parsing webhook payload with unknown object names...
Hello friends,
I'm setting up a webhook create a Deal when a order is made thru our 3rd party ecomm provider. All is good and well and working - except I'd like to record the 'license key' from the e-comm order. The trick is that that the json path to the key changes based on the product name. Really annoying and I can't edit the payload the e-comm service provides. For example, the part I'm concerned with is:
- "fulfillments": {
- "first_product_license_0": [
- {
- "license": "12345",
- "display": "License Key",
- "type": "license"
- }
- ],
- "instructions": "<p>Here is your license key:<br/></p><p>This license key has been emailed to you, along with a link to download your product.</p>"
- }
If the customer bought "second_product", then the name of that object would also be changed.
So: any clever ways to select the license key regardless of the product chosen?