convert object to associative array