title: For loop to check property is not undefined?
body: <p>I want to make a for loop to check my class attributes, but I don't want to show those attributes what are undefined.</p>
  
  <p>I have tried parse JSON with stringify and for each loop. But I've got the wrong generation.</p>
  
  <pre><code>  for(var alma in Category){
      if(typeof this.CatGroup !== "undefined"){
          return (  "Type=" +
        '"' +
        this.Type
  
  </code></pre>
  
  <pre><code>Object.keys(obj).forEach(function (key) {
   if(typeof obj[key] === 'undefined'){
      delete obj[key];
    }
  });
  
  </code></pre>
  
  <pre><code>&lt;C undefined/&gt;
  
  </code></pre>
  
  <p>With this for loop, I got only undefined.</p>