i am aware that forEach requires array data type for it to work. However my data which is a list of cutomers(in a Mongodb collection) was passed into another forEach loop in