Accessing Json data in typescript
<p>I have a JSON object from the Facebook api that has all the posts from a public page. I am using type script to grab the object and assign it to a variable. But I can't figure out how to access the fields. How do you access JSON data in type script? </p>

<p>Here is my JSON file:
<a href="https://graph.facebook.com/1650393515218783?fields=posts&amp;access_token=EAAN3TCkzCxsBACdSQIu3KDiORivp0eEeQWNMBu1aT8TnEWYEqQhblcl4IZAykwIwDFF5v6LB8BYNyOXYWrRhE7ildN2lnXFqwpnv7Bzq3Kh2ZB5FZBAMxrbpNEX2znds1G86AurOZAD0R1W3ec1ZBhwr8LNZAZCyGjgtMGbiZA44XwZDZD" rel="nofollow noreferrer">https://graph.facebook.com/1650393515218783?fields=posts&amp;access_token=EAAN3TCkzCxsBACdSQIu3KDiORivp0eEeQWNMBu1aT8TnEWYEqQhblcl4IZAykwIwDFF5v6LB8BYNyOXYWrRhE7ildN2lnXFqwpnv7Bzq3Kh2ZB5FZBAMxrbpNEX2znds1G86AurOZAD0R1W3ec1ZBhwr8LNZAZCyGjgtMGbiZA44XwZDZD</a></p>

<p>Here is my function:</p>

<pre><code>getBadger() {

    var link = 'https://graph.facebook.com/1650393515218783? fields=posts&amp;access_token=EAAN3TCkzCxsBACdSQIu3KDiORivp0eEeQWNMBu1aT8TnEWYEqQhblcl4IZA$

    this.http.get(link).subscribe(data =&gt; { this.data = data; this.posts = JSON.parse(data._body); });
</code></pre>