If this was the input,
{
"a_key": 2,
"another_key": 100,
"one_more_key": -4.2
}
what would be the best way to select the value of any of these keys by providing the name of the key as a variable? Ideally, I was looking for something like:
"a_key" as $key | .$key
This result in a syntax error, though ("unexpected '$'"). I could not figure out a straightforward way to make jq evaluate the variable.