The CreatorCon Call for Content is officially open! Get started here.

Dot Walking Complex Array in UI Builder Data BINDING

sushant06251
ServiceNow Employee
ServiceNow Employee

Let's assume i have a complex array:

 

 

{
    "payload": {
        "value": [
            [
                "ABC",
                "XYZ"
            ]
        ]
    }
}

 

 

 

I want to check the values in payload.value.0 if the first element is ABC and second is XYZ in DATA BINDING option in UI Builder.

 

I am trying @payload.value.0.0 == "ABC" && @payload.value.0.1 == "XYZ" but it's not working and getting replaced with @payload.value.0 == "ABC" && @payload.value."0.1" == "XYZ"

 

Screenshot 2024-03-04 at 12.05.27 PM.pngScreenshot 2024-03-04 at 12.05.04 PM.png

How can i access multi-dimensional array like this? Please note that i don't have option to use Script type in creating the condition.

1 REPLY 1

M Ismail
Tera Guru

Hi @sushant06251,

You can try this 

@payload.value[0][0] == "ABC" && @payload.value[0][1] == "XYZ"

Please hit helpful and accept this as a solution if it solved your problem.
Thank you!