Hello V.,
If you use only `entity`, you can use JSON variables, as:
@startuml
!$json = {
"users" : [
{"alias": "U1", "name": "User1"},
{"alias": "U2", "name": "User2"},
{"alias": "U3", "name": "User3"}
]
}
!foreach $u in $json.users
entity $u.name as $u.alias
!endfor
!procedure $myProc($s1, $s2)
!$i=$s1 -1
!$j=$s2 -1
$json.users[$i].alias -> $json.users[$j].alias
note left: message from $json.users[$i].name to $json.users[$j].name
!endprocedure
$myProc(1, 2)
$myProc(3, 2)
@enduml
See also help on:
If that can help,
Regards,
Th.