diff --git a/json.go b/json.go index ee6f6c1..0fdb977 100644 --- a/json.go +++ b/json.go @@ -181,7 +181,13 @@ func (oj *ownJSON) MergeDataForMap(ignoreError bool, dataList ...any) (map[strin } for k, v := range itemRes { - res[k] = v + if v == nil { + if _, exist := res[k]; !exist { + res[k] = v + } + } else { + res[k] = v + } } } return res, nil