0

I'm trying to search a JSON to extract some info, but I can't get it done. The JSON looks like this (it's kinda messy):

"d": [{
 "__type": "BetFire.Abstractions.Data.SportItem",
 "Id": 1,
 "Name": "Soccer",
 "ExtUrl": "https://s5.sir.sportradar.com/betinaction/en/match/{0}",
 "Items": [{
     "Id": 384,
     "CountryIso": "AUS",
     "Name": "AUS Victoria Premier League, Australia",
     "MarketsId": -1,
     "ParentId": 1,
     "MarketNames": null,
     "MarketTypeIds": [1,...],
 "Items": [{
        "Id": 636362298000000000,
        "CountryIso": null,
        "Name": "2017/07/21",
        "MarketsId": 0,
        "ParentId": 0,
        "MarketNames": null,
        "MarketTypeIds": null,
        "MarketTabs": null,
        "Items": null,
        "Events": [{
            "EventId": 8937395,
            "EventCodeId": 2210,
            "ExtraPriceCount": 181,
            "EventName": "Oakleigh Cannons vs. Melbourne Knights",
            "EventDate": "\/Date(1500633000000)\/",
            "Prices": [],
            "PrintPrices": null,
            "RacingSelections": null,
            "RacingDetails": null,
                                 etc..

I have tried something like this (after jsondecode):

$text = $result['d']['0']['ExtUrl'];
$EventName = $result['d']['Items']['Items']['Events']['EventName'];
echo $EventName;
echo $text;

But I get "{" as result.

Geraki
  • 19
  • 1
  • 6
  • Formatted your code, but had to remove a lot to stay within the 30,000 character limit. Please create a [**minimal, complete, and verifiable example**](http://stackoverflow.com/help/mcve). – Obsidian Age Jul 18 '17 at 21:00
  • I reformatted it do you have any solution? – Geraki Jul 18 '17 at 21:28

0 Answers0