I’m trying to find the best approach to decode a JSON structure that has two levels of embed node arrays (groups and group attributes). Here’s an example of the JSON structure
I’ve seen several examples of creating Go embedded structures to accommodate hierarchical node structures, but none that handle array situations like this. The examples I’ve seen require the Go struct elements to have variable naming convention that maps to the JSON, but I’m not sure how this would work. Look at the example above, it’s not as simple as naming a Struct element “Group1” because Group1 is a dynamic name that may or may not be in the JSON. clients submitting data in this JSON structure will all have different group names in different orders. Some will have the same, but at times groups won’t be present at all.