Reformatted data from JSON to an array