Getting data from a json list via changing sensor value

Hello everyone,
currently I am working on a jukebox. My current problem is, that I want to connect keys to file paths. For this, I have created a json-file:

{
  "A123": "/folder/musicfile1.mp3",
  "C323": "/folder/musicfile2.mp3"
}

If you want to play a specific song, I use a keypad (4x4) connect to an ESP8266, sending a sensor value to HA. So I have a sensor name “sensor.jukebox_pin” which delivers e.g. “A123” or “C323”. Now, if A123 is typed in, I want to read the path “/folder/musicfile1.mp3” and send it to a media player.

I am not able to extract the data from the json file in a correct way and every tutorial I found just explains different solution (getting the temperature value if the value is always behind “temperature” in the json).

Does anyone have an idea, how I can use the dynamic value of “sensor.jukebox_pin” to extract the path? I can also modify the json if needed.

Regards,
Harald