Added two functions to turn an array of string objects into an array of objects