You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Check if a REST response with an array contains a specific value

Accepted answer
10
Views
2
Comments
edited Jul 16, 2021 11:12AM in Visual Builder Studio 2 comments

Summary

Access to application level variables and looping through arrays.

Content

We have a set of REST API's for our application data.
We also have custom roles defined in our application and at some pont, these are fetched from the database via a REST call.
The returning user info includes the roles and has the following format:

{
    "status"       : "Login succesfull",
    "user"         : "[email protected]",
    "client_id"    : "MyId",
    "client_secret": "MySecret",
    "name"         : "Rob de Gouw",
    "roles"        : [
        {
            "name"  : "Employee",
            "active": "J"
        },
        {
            "name"  : "Manager",
            "active": "J"
        }
    ]
}

This response is mapped to an application level variable

We would like to make certain areas of the application inaccessible for employees who are not manager.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!