title: Add property to object only if it is not undefined
body: <p>I have the following object:</p>
  
  <pre><code>   let params = {
              limit: limit,
              offset: 15,
              status: "completed",
              product_id: this.route.snapshot.queryParams.product_id,
          };
  </code></pre>
  
  <p>The above object contain parameters that filter my datasource. </p>
  
  <p><code>this.route.snapshot.queryParams.product_id</code> is a query/get parameter </p>
  
  <blockquote>
    <p>?product_id=123</p>
  </blockquote>
  
  <p>However if this value is not present it's undefined. So I do not want to add <code>product_id</code> member to the parameters object if this value is undefined.</p>
  
  <p>If it is undefined the object should look like:</p>
  
  <pre><code>   let params = {
              limit: limit,
              offset: 15,
              status: "completed",
          };
  </code></pre>