title: Input a JSON variable to python -mjson.tool
body: <p>So in order to parse a JSON with bash, I use python -mjson.tool to grep the field and awk to get the value. I used to pipe it right after curl, so I could do something like <code>curl $url | python -mjson.tool | grep (something) | awk (something)</code> But I want to store the curl output to a variable and send that to the python -mjson.tool. I tried <code>python -mjson.tool $json</code> or <code>python -mjson.tool &lt;&lt;&lt; $json</code> but neither has worked. Is there a way to feed in a json variable to python? </p>
  
  <p>Also, I cannot use jq.</p>