iterate over array not object