flatten
flatten copied to clipboard
Data is lost if unflatten column name equals to another original column
Seems like a corner case, so I think at least we should raise an error when such situation happens:
echo '{"id": [0], "id_0": 2}' | flatten_json
>>>{"id_0": 2}
As you see, "id": [0]
is lost. One might use another separator, but the idea is that one can never be sure which separator will definitely work before he actually checks the data.
Could be related with https://github.com/amirziai/flatten/issues/17
Also seeing this issue in version 0.1.7 however degrading to version 0.1.6 does not show this issue