So you set the number of shape files

Equal to the number of the highest JSON file.