Please refer this example code:
@startuml
!$foo = { "company": "Skynet", "employees" : [
{"name" : "alice", "salary": 100 },
{"name" : "bob", "salary": 50} ]
}
start
!$index=0
:The salary of <u>$foo.employees[$index].name</u> is <u>$foo.employees[$index].salary</u>;
!$index=1
:The salary of <u>$foo.employees[$index].name</u> is <u>$foo.employees[$index].salary</u>;
@enduml
I want to "loop" through the list using the $index. But clearly, that requires to know the number of elements in the list. In my "real" usecase, I cannot use a foreach loop for this, I have to do it using index.
Is it possible to do this? If not, can it be added as a new feature?