I have this line of code that works as expected:
echo '{"slot":"we"}' | jq -re '.slot' || exit 1
however this code doesn’t raise an error even though I would expect so:
echo ' ' | jq -re '.slot' || exit 1
and neither does this:
echo '' | jq -re '.slot' || exit 1
how can I make sure that it raises an error if “slot” key is not found?
1