@@ -59,15 +59,19 @@ func pruneEmptyStrings(value any) any {
|
|||||||
for key, child := range v {
|
for key, child := range v {
|
||||||
if s, ok := child.(string); ok && s == "" {
|
if s, ok := child.(string); ok && s == "" {
|
||||||
delete(v, key)
|
delete(v, key)
|
||||||
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
v[key] = pruneEmptyStrings(child)
|
v[key] = pruneEmptyStrings(child)
|
||||||
}
|
}
|
||||||
|
|
||||||
return v
|
return v
|
||||||
case []any:
|
case []any:
|
||||||
for i, child := range v {
|
for i, child := range v {
|
||||||
v[i] = pruneEmptyStrings(child)
|
v[i] = pruneEmptyStrings(child)
|
||||||
}
|
}
|
||||||
|
|
||||||
return v
|
return v
|
||||||
default:
|
default:
|
||||||
return v
|
return v
|
||||||
|
|||||||
Reference in New Issue
Block a user