title: Iterate through dictionaries jq - shell
body: <p>I have a JSON like this</p>
  
  <pre><code>{
    "images" : [
      {
        "size" : "29x29",
        "idiom" : "iphone",
        "filename" : "Icon-Small@2x.png",
        "scale" : "2x"
      }
       ......
       ......
      {
        "size" : "60x60",
        "idiom" : "iphone",
        "filename" : "Icon-60@3x.png",
        "scale" : "3x"
      }
    ],
    "info" : {
      "version" : 1,
      "author" : "xcode"
    }
  }
  </code></pre>
  
  <p>I want to iterate through each dictionary in <code>images</code> array.
  For that I wrote</p>
  
  <pre><code>declare -a images=($(cat Contents.json | jq ".images[]"))
  for image in "${images[@]}"
  do
      echo "image --$image"
  done
  </code></pre>
  
  <p>I am expecting output that each dictionary is printing in an iteration. That is</p>
  
  <pre><code>image --{
    "size" : "29x29",
    "idiom" : "iphone",
    "filename" : "Icon-Small@2x.png",
    "scale" : "2x"
  }
  image --{
    "size" : "29x29",
    "idiom" : "iphone",
    "filename" : "Icon-Small@3x.png",
    "scale" : "3x"
  }
  image --{
    "size" : "40x40",
    "idiom" : "iphone",
    "filename" : "Icon-Spotlight-40@2x.png",
    "scale" : "2x"
  }
  </code></pre>
  
  <p>Etc</p>
  
  <p>But its iterating through each and every single elements in each dictionary like</p>
  
  <pre><code>image --{
  image --"size":
  image --"29x29",
  image --"idiom":
  image --"iphone",
  image --"filename":
  ....
  ....
  ....
  </code></pre>
  
  <p>What is wrong with  my code</p>