title: Remove a key:value from an JSON object using jq
body: <p>I’m trying to add and remove a 'key:value' from a JSON object using jq. I’m new using jq and I do not understand the errors that jq is throwing at me, so any help pushing me in the correct direction is greatly appreciated. My specific issue is I have a JSON object (below) and I want to be able to add/remove the “maxHeight” key/value from the JSON object. </p>
  
  <p>Some commands I’ve tried with the errors I get…</p>
  
  <pre><code>jq 'recurse(.[]) |= del(.maxHeight)' new.json   
  </code></pre>
  
  <blockquote>
    <p>Cannot iterate over null (null)</p>
  </blockquote>
  
  <pre><code> jq 'recurse(.[]) |= {maxHeight}' new.json
  </code></pre>
  
  <blockquote>
    <p>Cannot iterate over string ("feature")</p>
  </blockquote>
  
  <pre><code>jq 'recurse(.[]) |= .maxHeight' new.json 
  </code></pre>
  
  <blockquote>
    <p>Cannot index string with string "style"</p>
  </blockquote>
  
  <p>new.json file looks like this...</p>
  
  <pre><code>{
    "style": {
      "className": "feature",
      "showLabels": false,
      "color": "function(feature, variableName, glyphObject, track){if(feature.get(\"type\") === \"CDS\"){return \"#9CFBF5\";} else if(feature.get(\"type\") === \"exon\"){return \"#43A47F\";} else if(feature.get(\"type\") === \"intron\"){return \"#E8E8E8\";} else if(feature.get(\"type\") === \"five_prime_UTR\"){return \"#F192FE\";} else if(feature.get(\"type\") === \"three_prime_UTR\"){return \"#FEC892\";} else {return \"#FF0000\";}}",
      "arrowheadClass": null,
      "featureCss": "padding:3px;"
    },
    "menuTemplate": [
      {
        "label": "View details"
      },
      {
        "label": "Highlight a gene"
      },
      {
        "iconClass": "dijitIconBookmark",
        "content": "function(track,feature,div) { window.parent.angular.element(window.frameElement).scope().specificNote( feature[2] ) }",
        "action": "contentDialog",
        "title": "(feature{name})",
        "label": "Create Note"
      }
    ],
    "hooks": {
      "modify": " function(track,feature,div){   var checkArr=[\"Reference\",\"Missing\",\"Heterozygous\",\"NonReference\"];for(var i=0;i&lt;feature.length;i++){for(var j=0;j&lt;checkArr.length;j++){  if( i&gt;3) { if( feature[i] ===  checkArr[j] ) {  if(feature[i]==\"NonReference\"){div.style.backgroundColor=\"red\"}else if(feature[i]==\"Reference\"){div.style.backgroundColor=\"green\"}else if(feature[i]==\"Heterozygous\"){div.style.backgroundColor=\"orange\"}else if(feature[i]==\"Missing\"){div.style.backgroundColor=\"grey\"} }}}}} "
    },
    "key": "cucumber_ChineseLong_v2.gff3",
    "storeClass": "JBrowse/Store/SeqFeature/NCList",
    "trackType": null,
    "maxHeight": "200px",
    "urlTemplate": "tracks/cucumber_ChineseLong_v2.gff3/{refseq}/trackData.json",
    "compress": 0,
    "label": "cucumber_ChineseLong_v2.gff3",
    "type": "JBrowse/View/Track/CanvasFeatures"
  }
  </code></pre>