Solved by ptrblck in post #2 
              
              
                Based on your description it seems you have multiple json files, where each file might contain the same class indices as keys with the corresponding image samples. 
If that’s the case, indexing into these file would work using the class label, which would have the drawback of a possibly complicated …