Using a REST API, can you retrieve the key of an object?


Given the following object: 


    [{

        "-LautSlmDA_H95niIXC-": {

            "createdBy": "John Doe",

            "datedAdded": "2019-03-26",

            "status": "open"

        }

    }]


Is there no way to retrieve the "-LautSlmDA_H95niIXC-": portion? Response.Current only allows for the defined attributes to be accessed (createdBy, datedAdded, status). And not the key which is at the root of the object.

Solution

Hi David,

You can use this component : ardoJSON

In that component use this function : JSON_Lisfity

it will convert your input into below data, so that you can access data using Key property.


 [

{

        Key : "-LautSlmDA_H95niIXC-",

        Value : {

            "createdBy": "John Doe",

            "datedAdded": "2019-03-26",

            "status": "open"

        }

}

]

Solution