title: how to parse a JSON String with jq (or other alternatives)?
body: <p>I'm trying to get <code>jq</code> to parse a JSON structure like:</p>
  
  <pre><code>{
    "a" : 1,
    "b" : 2,
    "c" : "{\"id\":\"9ee ...\",\"parent\":\"abc...\"}\n"
  }
  </code></pre>
  
  <p>That is, an element in the JSON is a string with escaped json.</p>
  
  <p>So, I have something along the lines of
  <code>$ jq [.c] myFile.json | jq [.id]</code></p>
  
  <p>But that crashes with <code>jq: error: Cannot index string with string</code></p>
  
  <p>This is because the output of .c is a string, not more JSON.
  How do I get jq to parse this string?</p>
  
  <p>My initial solution is to use sed to replace all the escape chars (<code>\":\"</code>, <code>\",\"</code> and <code>\"</code>) but that's messy, I assume there's a way built into <code>jq</code> to do this?</p>
  
  <p>Thanks!</p>
  
  <p>edit:
  Also, the jq version available here is:</p>
  
  <pre><code>$ jq --version
  jq version 1.3
  </code></pre>
  
  <p>I guess I could update it if required.</p>