0

I have the below json obtained behind a url

[
{
    "id": "eb5274457814f2cc586fc6f7bb4f5640",
    "has_outrights": true,
    "sport_key": "americanfootball_nfl_super_bowl_winner",
    "sport_title": "NFL Super Bowl Winner",
    "commence_time": "2023-02-12T23:30:00Z",
    "home_team": null,
    "away_team": null,
    "bookmakers": [
        {
            "key": "unibet",
            "title": "Unibet",
            "last_update": "2022-07-05T15:44:14Z",
            "markets": [
                {
                    "key": "outrights",
                    "outcomes": [
                        {
                            "name": "Buffalo Bills",
                            "price": 7.5
                        },
                      
                        {
                            "name": "Atlanta Falcons",
                            "price": 201.0
                        },
                        {
                            "name": "Houston Texans",
                            "price": 301.0
                        }
                    ]
                }
            ]
        },
        {
            "key": "draftkings",
            "title": "DraftKings",
            "last_update": "2022-07-05T15:46:31Z",
            "markets": [
                {
                    "key": "outrights",
                    "outcomes": [
                        {
                            "name": "Buffalo Bills",
                            "price": 7.0
                        },
                        {
                            "name": "Tampa Bay Buccaneers",
                            "price": 8.0
                        },
                        

I need to access the results within outcomes (NAME and PRICE) I just need to get the data from these two fields and print it on the screen in the form of a table.

But everything I tried returned a blank screen.

I'm a beginner, can anyone help with this?

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
  • You have an array of objects, and within each object you also have some properties and also some other arrays. You will have to nest some loops to dig into the right place for the data you want – RiggsFolly Jul 05 '22 at 16:38
  • @RiggsFolly yea,. but I don't know how to make this process go deeper – André Luiz Mardonis Jul 05 '22 at 16:41

0 Answers0