title: JS Object Destructuring with Filter
body: <p>I have an object of objects I want to filter via the value of a key in the objects. For example, my object looks like:</p>
  
  <pre><code>const Financials = {
    xxxxx: {
      creditid: "yyyy",
      aggRevs: 2000,
      aggexpenses: 1000,
      dateOf: 12 / 31 / 2015
    },
    zzzz: {
      creditid: "yyyy",
      aggRevs: 1000,
      aggexpenses: 1000,
      dateOf: 12 / 31 / 2016
    },
    aaaa: {
      creditid: "bbbb",
      aggRevs: 1000,
      aggexpenses: 1000,
      dateOf: 12 / 31 / 2016
    }
  };
  </code></pre>
  
  <p>I want to be able to filter the object by creditid. For example, I want to return an object that contains all the objects that have a creditid of "yyyy".</p>
  
  <pre><code>var { creditid: "yyyy" } = Financials;
  </code></pre>
  
  <p>And the result would look like:</p>
  
  <pre><code>{
    xxxxx: {
      creditid: "yyyy",
      aggRevs: 2000,
      aggexpenses: 1000,
      dateOf: 12 / 31 / 2015
    },
    zzzz: {
      creditid: "yyyy",
      aggRevs: 1000,
      aggexpenses: 1000,
      dateOf: 12 / 31 / 2016
    }
  }
  </code></pre>
  
  <p>Is this possible using destructuring?</p>