Use payload key name as value (or string)

In a scenario we’re receiveing a wierd webhook that has the array inside the key name and empty value:

[
    {
        "{\"secret\":\"xxxxxx\",\"subscription\":\"xxxxxx\",\"amount_usd\":\"100.00\",\"status\":\"1\",\"next_billing_date\":\"2022-09-02\",\"signature\":\"c339b51ece633a73716e05bc8875e8ba\"}": "",
        "__IMTHEADERS__": [
            {
                "name": "connection",
                "value": "upgrade"
            },
            {
                "name": "x-real-ip",
                "value": "74.84.133.226"
            },
            {
                "name": "x-request-id",
                "value": "070bbebf7b680899db446207360007b7"
            },
            {
                "name": "content-length",
                "value": "185"
            },
            {
                "name": "accept",
                "value": "*/*"
            },
            {
                "name": "content-type",
                "value": "application/x-www-form-urlencoded"
            }
        ],
        "__IMTMETHOD__": "POST"
    }
]

We can’t change the webhook and we can’t parse the key name, just its values, that is empty.

I’m pretty sure that is a simple solution for that, but we couldn’t figure it out. Someone have any idea on how we can make it work?

Thanks in advance

Hey,

Use the Parse JSON Module. It should enable you to extract the values.

Cheers!

1 Like

Hi @Wemakefuture

When parsing this payload we get a parameter with empty value, that’s why Make is showing a message of empty (null) value.

The array is sent as a parameter, that’s the problem.

"{\"secret\":\"xxxxxx\",\"subscription\":\"xxxxxx\",\"amount_usd\":\"100.00\",\"status\":\"1\",\"next_billing_date\":\"2022-09-02\",\"signature\":\"c339b51ece633a73716e05bc8875e8ba\"}": "", //no value
        

How can we parse the parameter? And get something like this:

{
   "secret": "xxxxxx",
   "subscription": "xxxxxx",
   "amount_usd": "100.00",
   "status": "1",
   "next_billing_date": "2022-09-02",
   "signature": "c339b51ece633a73716e05bc8875e8ba"
}
        

Thanks in advance!