@echo off
if "%~2" == "" (
  echo Usage: %0 filename key
  exit /b 1
)

set filename=%1
set key=%2

setlocal enableDelayedExpansion

for /f "usebackq delims=" %%a in (`jq -r .%key% "%filename%"`) do (
  set value=%%a
)

echo %value%
