Convert JSON into array of elements

Also now includes a retry when acquiring the data fails.