Modify array to object conversion