Return Nested Key in Groovy
问题 I am trying to determine the best way to return nested key values using groovy. If I have a map: def map = [ OrganizationName: 'SampleTest', Address: [ Street: '123 Sample St', PostalCode: '00000', ] ] Is there a way to return all of the keys? OrganizationName , OrganizationURL , Address.Street , Address.PostalCode ? If I didn't have an map within a map I could use map.keySet() as String[]. Should I just loop through each key and see if it is an instanceof another map? 回答1: There's no such