Variable access clarification

Hello,

We are starting to get into object like variable manipulations as our process matured enough, and i would like to access nested variables in a json objects, as am reading the docs i stumbled upon this


I didn’t really understand the difference between [a+b] and [a.b] does it mean b is compiled and the value of the variable b is used in runtime to access a specific in object “a” when using the “+” sign ?

Hi! Welcome to Camunda’s User Forums!

Assuming you eventually got to FEEL Documentation

Assume for a moment that you have a variable stack like:

{
    "a": 10,
    "b": 5,
    "c": {
        "d": 2,
        "e": 3
    }
}

a + b would give 15
a.b would give null (a doesn’t have a sub property of b)
c.d would give 2
c.d + c.e would give 5

You can try all of this out at FEEL Playground (online) | FEEL-Scala

1 Like