modified the dictionaryWithPropertiesOfObject method which now can ditact the array of objet and able to convert into dictionary