There are many examples on the web that show how to decode an inbound JSON string into a struct or struct of structs using the Codable design:
Codable
st