title: How can i parse through a json file in a bash script?
body: <p>I want to grab the faceRectangle and and place that into another text file 
  like so</p>
  
  <p>SET "faceRectangle" ""top": 114"</p>
  
  <p>SET "faceRectangle" ""left": 212"</p>
  
  <p>So that all the values under there corresponding heading are properly formatted and copied into another file like above
  and i want to do this in a bash file</p>
  
  <pre><code>[
    {
  "faceRectangle": {
    "top": 114,
    "left": 212,
    "width": 65,
    "height": 65
  },
  "scores": {
    "anger": 1.0570484E-08,
    "contempt": 1.52679547E-09,
    "disgust": 1.60232943E-07,
    "fear": 6.00660363E-12,
    "happiness": 0.9999998,
    "neutral": 9.449728E-09,
    "sadness": 1.23025981E-08,
    "surprise": 9.91396E-10
  }
   }
  </code></pre>
  
  <p>]</p>
  
  <p>how would I go about doing this?</p>
  
  <p>UPDATE: this is what I have so far:</p>
  
  <pre><code>#!/bin/bash
  
  faceR=($(jq -r '.[0].faceRectangle' emotion.json))
  scores=($(jq -r '.[0].scores' emotion.json))
  
  echo " SET "faceRectangle" "${faceR[@]}" " &gt;&gt; data.txt
  
  cat data.txt | redis-cli --pipe
  </code></pre>
  
  <p>I keep getting an error "unbalanced quotes in request"
  how can I fix that?</p>