20
Views
2
Comments
Solved
Restructure JSON from Generic Record to Table

Hello! We are implementing a new 3rd party integration and we are receiving JSON responses that are pretty generic and was wondering if anyone has been able to solve this in a more scalable, maintainable way.

JSON Response Structure Example : 

[

    {

        "label": "Name"

        "text": "Greg",

    },

    {

        "label": "Address"

        "text": "1234 Main Street"


    },

    {

        "label": "PhoneNumber",

        "text": "+11234567890",

    }

]


We are trying to find a way to easily turn each record in the Response into it's own Key value pair. The desired output would look something like :

{

    "Name" : "Greg",

    "Address" : "1234 Main Street",

    "PhoneNumber" : "+1234567890"

}

I know we could do this by filtering the first record list by its label's value and then setting the appropriate value in the output record but with ~40 different fields we want to map in production that seems neither maintainable nor efficient. 

Solution

Hi @Nick MATES ,

check out JSON_Objectify of the ardoJSON forge component.

Dorine

That worked! Thank you.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.