two binded pickers

I'm trying to create 2 pickers, one that when updated changes the values of the second picker based on the index of the first picker...

When I change the value of the first picker, the second picker updates accordingly.

The issue? When I select an item from the second picker, I get index out of range. The error is obvious, there are more items in the second picker then the first and they are both binded to the same dataset..

So, when $selectedSubsection changes in the first picker, the second picker get's the according data.


Now, how do I allow the second picker to make some choices on a new content so that $selectedSubsection doesn't change?

Picker(selection: $selectedSubsection, label: Text("Subsection")) {
ForEach(0 ..< self.subsections.count) {
Text(self.subsections[$0].name)
}}
Picker(selection: $selectedSubsection, label: Text("Subsection")) {
ForEach(0 ..< self.subsubsections.count) {
if self.subsubsections[$0].belongs_to == self.subsections[self.selectedSubsection].id
{
Text(self.subsubsections[$0].details)
}
}}