i have found the solution for no matter how many nested composite object would be inside it it can change it into dictionary