Need help for json decoding

{
"total_count": 553,
"offset": 0,
"limit": 1,
"notifications": [
    {
        ...
        "app_id": "3beb3078-e0f1-4629-af17-fde833b9f716",
        ...
        "chrome_web_icon": "https://img.onesignal.com/t/73b9b966-f19e-4410-8b5d-51ebdef4652e.png",
        ...
        "contents": {
            "en": "Come by and check out our new Jordan's!!! (Shoes) πŸŽƒπŸ™ŠπŸ‘»"
        },
        "converted": 0,
        "data": {
            "your_data_key": "your_data_value"
        },
        ...,
        "errored": 1,
        "excluded_segments": [
            "3 Days Inactive"
        ],
        "failed": 0,
        ...
        "headings": {
            "en": "Thomas' Greatest Site in the World!! 😜😁"
        },
        "id": "e664a747-324c-406a-bafb-ab51db71c960",
        ...
        "included_segments": [
            "all"
        ],
        ...
        "queued_at": 1557946677,
        "remaining": 0,
        "send_after": 1557946620,
        "completed_at": 1557946677,
        "successful": 386,
        ...
        "url": "https://mysite.com",
        ...
        "platform_delivery_stats": {
            "chrome_web_push": {
                "successful": 14,
                "failed": 0,
                "errored": 0
            },
            "android": {
                "errored": 1,
                "successful": 368,
                "failed": 0
            },
            "safari_web_push": {
                "successful": 2,
                "failed": 0,
                "errored": 0
            },
            "ios": {
                "successful": 1,
                "failed": 0,
                "errored": 0
            },
            "firefox_web_push": {
                "successful": 1,
                "failed": 0,
                "errored": 0
            }
        },
        "ios_attachments": {
            "id": "https://img.onesignal.com/n/44843933-68d4-450c-af5c-5e5c1a9d946e.jpg"
        }
    }
]

}
i want to get the value of contents and headings. this is what i have tried

i don’t know much about decoding json so pls guide me.

notifications is a list.. so you have to first Do for each item in list and the list will be look up in pairs key : notifications

then inside the for each item in list block use the add item to list block..

also the pairs of the β€˜en’ should be contents not the other way

2 Likes

thanks it worked for me. actually i used this because inbuilt push notification blocks are not working. thanks for your help.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.