I want to parse a JSON file to generate multiple diagrams. These have roughly the same structure, but some portions are configurable. But this doesn't appear possible as all the pages include all the participants, and not only the ones on that page.
Below is my MVCE:
@startuml
!$people_data = {
"group_list" : [
{"first": "Alice", "second": "Bob"},
{"first": "Charlie", "second": "David"}
]
}
!foreach $group in $people_data.group_list
newpage
hide unlinked
$group.first -> $group.second : Hello
!endfor
@enduml
I get three diagrams and they contain all the participants, not only the ones appearing on that page. How to fix this problem so that the diagrams corresponding to each item in the JSON data is independent of others?
While I could live with the extra "empty" diagram, it would be good if that can be fixed as well.