title: How to get properties of object from this HTTP response
body: <p>I am trying to display the currency name or key like &quot;USD&quot;, &quot;AUD&quot;, &quot;EUR&quot; with their respective &quot;last&quot; and &quot;buy&quot; properties from this HTTP response:</p>
  <p><a href="https://i.stack.imgur.com/16fs0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/16fs0.png" alt="enter image description here" /></a></p>
  <p>and I just get back a list of &quot;key&quot; strings like this
  <a href="https://i.stack.imgur.com/3gJb0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3gJb0.png" alt="enter image description here" /></a>
  but I can't figure out why my &quot;key&quot; is being returned as a string here.
  It's making it difficult for me to programmatically access the properties for each currency</p>
  <p>this is my <strong>dashboard.component.ts</strong></p>
  <pre><code>  prices;
    bitcoinOwned;
  
    ngOnInit(): void {
  
    this.data.getPrice()
   .pipe(map(result =&gt; {this.prices = result, console.log(&quot;result&quot;, result) 
    for (let key in result) {console.log( key)}
  } ))
    .subscribe();
       
  }
  </code></pre>
  <p>my <strong>data.service</strong></p>
  <pre><code> getPrice() {
      var url = &quot;https://blockchain.info/ticker&quot;;
      return this.http.get(url);
    }
  </code></pre>
  <p>and my <strong>template</strong></p>
  <pre><code>&lt;div&gt;
      {{ prices |json }} 
  &lt;/div&gt; 
  
  &lt;div&gt;
    USD last: {{ prices?.USD.last |json }} USD sell: {{ prices?.USD.sell |json }}
  &lt;/div&gt; 
  </code></pre>
  <p>I can access the properties when I do it manually for each key like this but I need to iterate over the keys and do it more programmatically so any help would be appreciated!!</p>