save array with objects