Using maps we can use .Keys to get all the keys. I know a custom type isn't a map, but I just wanted to check if it was possible to get the property names from it?
(I have many custom types, and many of them are populated with maps from my server. I wanted to make a naïve "verify that the custom type and the incoming map holds the same properties/keys before actually considering it valid and converting the map to an instance of the custom type". Defensive programming, basically.)
(I have many custom types, and many of them are populated with maps from my server. I wanted to make a naïve "verify that the custom type and the incoming map holds the same properties/keys before actually considering it valid and converting the map to an instance of the custom type". Defensive programming, basically.)