workingdogintokyo's answer works. I don't why the compiler cannot check dictionary by key. Thx for your help.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: