I have obj like this
{hello: \'world\', \"foo.0.bar\": v1, \"foo.0.name\": v2, \"foo.1.bar\": v3}
It should be expand to
{
You might want to copy your keys in a list and iterate over your dict using the latter, eg:
def expand(obj): keys = obj.keys() for k in keys: expandField(obj, k, v)
I let you analyse if the resulting behavior suits your expected results.