obj to array function added