title: How to reconstruct single object after its deconstruction in jq
body: <p>I receive a quite big json file with lots of properties that are there only for historical reasons and are not used anymore. To simplify this file, I've used <code>jq</code>, deconstructed json with <code>to_entries</code>, but now I don't know how to rebuild my object back with sub-objects that remained.</p>
  
  <p>Here's example:</p>
  
  <p>input</p>
  
  <pre><code>{
    "empty1": [],
    "empty2": [],
    "full1": "test",
    "full2": { "a": 1, "b": 2 }
  }
  </code></pre>
  
  <p>current filter:</p>
  
  <pre><code>to_entries[] | select((.value | length) &gt; 0) | { (.key) : .value }
  </code></pre>
  
  <p>current output</p>
  
  <pre><code>{"full1":"test"}
  {"full2":{"a":1,"b":2}}
  </code></pre>
  
  <p>desired output</p>
  
  <pre><code>{
    "full1": "test",
    "full2": {
      "a": 1,
      "b": 2
    }
  }
  </code></pre>