sort .json file and dl proper images works

The whole script works now.