create map by FromJSON or New(with map[string]interface{}), and Set with fields got the difference result.
m := objx.FromJSON(`{"a": {"b": 1}}`)
m.Set("a.c", 2)
fmt.Println(m.JSON()) // output: {"a": {"c": 2}}
m := objx.New(map[string]interface{}{
"a": map[string]interface{}{
"b": 1,
},
})
m.Set("a.c", 2)
fmt.Println(m.JSON()) // output: {"a": {"b": 1, "c": 2}}