Transform Object Into Array Javascript Function Expression