Amened function to put event meta data on one level on array