Collapsing the attribute value if the value of the array