We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
merge_update
If I have these two BoxDicts:
In [1]: from box import Box ...: dict1 = Box({'data': [{'foo': 1, 'foobar': 20}, {'bar': 2}] }, box_dots=True) ...: dict2 = Box({'data': [{'foo': 1, 'baz': 10}] }, box_dots=True) ...: print(dict1.keys(dotted=True)) ...: print(dict2.keys(dotted=True)) ['data[0].foo', 'data[0].foobar', 'data[1].bar'] ['data[0].baz', 'data[0].foo']
Then, if I use merge_update I get:
In [2]: dict1 + dict2 Out[2]: Box({'data': [{'foo': 1, 'baz': 10}]})
When merging the two datasets, it would be great if Box entered each list element and updated the dictionary:
In [1]: dict1 + dict2 Out[1]: Box({'data': [{'foo': 1, 'foobar': 20, 'baz': 10}, {'bar': 2}]})
Since the BoxDict has a pseudo-key for elements of the lists (e.g., 'data[0].foo') it feels like it should be possible.
python: 3.11 box: 7.1.1
The text was updated successfully, but these errors were encountered:
Hi, I am new to open source , and it seems like I can be able to solve this issue , can I work on it ?
Sorry, something went wrong.
No branches or pull requests
Current
If I have these two BoxDicts:
Then, if I use
merge_update
I get:Expected behaviour
When merging the two datasets, it would be great if Box entered each list element and updated the dictionary:
Since the BoxDict has a pseudo-key for elements of the lists (e.g., 'data[0].foo') it feels like it should be possible.
Versions
python: 3.11
box: 7.1.1
The text was updated successfully, but these errors were encountered: