Converting Object To Array In Javascript