How can I access 'line' data from the given object? This is the link to api -https://sportsbook.draftkings.com/api/odds/v1/leagues/3/offers/gamelines.json
{
"events": [{
"id": 153502679,
"name": "Green Bay Packers @ Chicago Bears",
"homeTeamName": "CHI Bears",
"awayTeamName": "GB Packers",
"startDate": "2019-09-06T00:20:00.0000000Z",
"offers": [{
"id": "1-2160521227",
"label": "Point Spread",
"outcomes": [{
"id": "1-2568051855",
"label": "GB Packers",
"line": "+3.5000",
"oddsAmerican": "-110",
"oddsDecimal": 1.9100,
"oddsFractional": "10/11",
"participant": "GB Packers"
},
I am getting
<td>{{data.name }}</td>
<td>{{data.homeTeamName }}</td>
<td>{{data.awayTeamName}}</td>
<td>{{data.startDate }}</td>
<!--<td>{{data.offers[1].label }}</td>-->
<td>{{data.offers.outcomes[2].line }}</td>
I tried the above code to access line in outcomes object by it give me below error
ERROR TypeError: Cannot read property '2' of undefined