-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set operator with not expected behavior #97
Comments
I stumbled upon a very similar, related bug where adding a previously non-existing key-value pair to a nested map with the Set-method resulted in the siblings of the new key-value pair being deleted from the map. As i dug into the code i found the culprit:
If the object at So the bug here is the assumption that there will only be data of type map[string]interface{}
|
Hi!
result: {"root":{"test":{"name":"new test","name2":"new test2"}}} root.other is completely dropped... Am I doing something wrong? |
this is also the case when doing something like this:
newSlice will be added to a new empty objx.Map |
oh I just saw that 0.3.0 is the latest release and it is from july 2020, will there be a new release? |
fixed it with: |
create map by
FromJSON
orNew
(with map[string]interface{}), andSet
with fields got the difference result.The text was updated successfully, but these errors were encountered: