I want to delete subfolders, only if all its files are of some specific extension, say json. I have seen a similar question Find and copy directories containing file type. Thanks in advance.
├── 20101018_DSC05369.JPG
├── f
│ └── some.jpg
├── f1
│ ├── f
│ │ └── some.json
│ ├── f4
│ │ ├── a.jpg
│ │ └── some.json
│ └── some.json
└── some.jpg
exp. result:
.
├── 20101018_DSC05369.JPG
├── f
│ └── some.jpg
├── f1
│ ├── f4
│ │ ├── a.jpg
│ │ └── some.json
│ └── some.json
└── some.jpg