looping through an array of objects that contains three key value pairs