Do you need something that is fully Json compliant, or something to work on simple key-value pairs. I wrote the following. It has worked, but no guarantees. use: json json-string key default json(){ a=$(echo "$1" | sed -E 's/[{}]/,/g; s/ *([:,]) /\1/g; s/"//g' | grep -oE ",$2:[^,]") if [ -z "$a" ]; then echo "$3" else echo "$a" | cut -d : -f 2 fi }