Made the reference iteraterate over array elements which are objects.