I have dicts of two types representing same data. These are consumed by two different channels hence their keys are different.
for example: Type A
{ 
  "key1": "value1",
  "key2": "value2",
  "nestedKey1" : {
      "key3" : "value3",
      "key4" : "value4"
   } 
}
Type B
{ 
  "equiKey1": "value1",
  "equiKey2": "value2",
  "equinestedKey1.key3" : "value3",
  "equinestedKey1.key4" : "value4"
}
I want to map data from Type B to type A. currently i am creating it as below
{
  "key1": typeBObj.get("equiKey1"),
   .....
}
Is there a better and faster way to do that in Python
 
     
    