title: How to remove all properties that match a regex from a JavaScript object?
body: <p>I have the following JS object:</p>
  
  <pre><code>let obj = {
      'a': 1,
      'a-gaboom': 1,
      'b': 1,
      'b-gaboom': 1
  };
  </code></pre>
  
  <p>I want to delete all fields that end with <code>'-gaboom'</code>.</p>
  
  <p>I could do it manually with:</p>
  
  <pre><code>delete obj['a-gaboom'];
  delete obj['b-gaboom'];
  </code></pre>
  
  <p>But I'd like to do it dynamically using a RegExp?</p>