Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
I like to use quicktype.io for making codables out of JSON. For nested JSON, like that location object you have in there, quicktype typically creates a nested codable and just sets the "location" inside of the parent codable to that location codable type. If you want to access it, you would decode the entire thing and pull the location out. That pattern works for my uses, but for your use, like if the JSON is enormous and you only want the location from the entire thing, there might be a better way.
You might also want to take a look at MPLew-is’s DeepCodable here: https://github.com/MPLew-is/deep-codable