We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a484ec6 + a6786fb commit b9d62f1Copy full SHA for b9d62f1
map.go
@@ -99,7 +99,9 @@ func getMapOfAllKeyValues(s interface{}) *map[string]interface{} {
99
for i := 0; i < s.Len(); i++ {
100
if t.Field(i).CanInterface() {
101
m := getMapOfAllKeyValues(s.Index(i).Interface()) // get the map value of the object, recursively
102
- sliceOfMap = append(sliceOfMap, *m) // append to the slice
+ if m != nil {
103
+ sliceOfMap = append(sliceOfMap, *m) // append to the slice
104
+ }
105
}
106
107
finalMap[k] = sliceOfMap
0 commit comments