Home

Access A JSON Value In An Object Based Off Filtering From Another Key In jq

echo '[ 
    {
      "k": "alfa", 
      "v": "bravo"
    },
    {
      "k": "charlie",
      "v": "delta"
    }
    ]' | jq '.[] | select(.k == "charlie") | .v'
results full
~ fin ~