deepdiff
deepdiff copied to clipboard
Rename diff result keys
trafficstars
the output of a diff depending on the view look like the following
{'values_changed': [<root.status t1:"UP", t2:"DOWN">]}
{'values_changed': {'root.status': {'new_value': 'DOWN', 'old_value': 'UP'}}}
it would be great if it was possible to rename the keys for example
{'values_changed': [<root.status api:"UP", switch:"DOWN">]}
{'values_changed': {'root.status': {'switch': 'DOWN', 'api': 'UP'}}}
or better still have someway to I can create my own result
Hi @Shaun-3adesign Interesting idea. It should be easy to add parameters to rename t1 and t2 to anything you want. PRs are very welcome too!