change double array to object array