You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
where the list-index could be '[i]' or just 'ì' or anything easily identifiable.
Attached is a sample of flatten module, modified from the original, to return the above output if explode_lists=True is passed as argument.
Do you think this can be done?
My wish would go further and ask if benedict could be able to use the returned path to point to the value of the single element of list.
@Loreton thank you for this suggestion, this issue is related to list index support as many other issues. List index support must be implemented at a lower level in this library.
Anyway, the unflatten method should be reverse correctly the result of the flatten method.
It means that this should not raise an Exception: assert d == unflatten(flatten(d))
I need that flatten method return {"key_path": value} also for elements in a list in a dictionary.
For the following dict:
dict.flatten() return:
I would like to get something like:
where the list-index could be '[i]' or just 'ì' or anything easily identifiable.
Attached is a sample of flatten module, modified from the original, to return the above output if explode_lists=True is passed as argument.
Do you think this can be done?
My wish would go further and ask if benedict could be able to use the returned path to point to the value of the single element of list.
Regards
Loreto
flatten.zip
The text was updated successfully, but these errors were encountered: