title: How can I iterate objects in component of Angular 5
body: <p>I have object having string as keys and values. I want to trim all values of object in one go without need to check every index manually. </p>
  
  <p>So, I have to iterate over object and will trim the value and the update value in object.</p>
  
  <p>Can you share a way to iterate any object in Angulario 5.</p>
  
  <pre><code>let obj = {
    "name" =&gt; "    keshav     ",
    "prof" =&gt; "    Engineer   "
  }
  </code></pre>
  
  <p>And I would like to this to convert into </p>
  
  <pre><code>let obj = {
    "name" =&gt; "keshav",
    "prof" =&gt; "Engineer"
  }
  </code></pre>