Typically, after days of trying, I worked it out myself minutes after asking this question.
Convert the json to a custom object, create a new list, create a variable for the array with an initial value of 0. Then loop through the custom object, incrementing the index variable by one each time.