$.when with objects