batch renaming files using their Json files

Hello, I've over 1k files as in .wem format along with their json files which have their actually in game ID and media names. I was wondering if I could rename them with a help of a script or anything. Would make my job so much easier.

I'd appreciate all the help!