Change array of lat, long and weight to object