I have created a method which can populate an object from dictionary