Hướng dẫn php json nested array - mảng lồng nhau php json

Tôi đang đấu tranh để lấy một số giá trị từ tệp JSON được định dạng như thế này:

{
"@context": [
    "https://raw.githubusercontent.com/geojson/geojson-ld/master/contexts/geojson-base.jsonld",
    {
        "wx": "https://api.weather.gov/ontology#",
        "@vocab": "https://api.weather.gov/ontology#"
    }
],
"type": "FeatureCollection",
"features": [
    {
        "id": "https://api.weather.gov/alerts/NWS-IDP-PROD-2485131-2320093",
        "type": "Feature",
        "geometry": {
            "type": "Polygon",
            "coordinates": [
                [
                    [
                        -95.45,
                        32.36
                    ],
                    [
                        -96.07,
                        32.36
                    ],
                    [
                        -96.08,
                        32.76
                    ],
                    [
                        -95.92,
                        32.82
                    ],
                    [
                        -95.85,
                        32.77
                    ],
                    [
                        -95.77,
                        32.77
                    ],
                    [
                        -95.76,
                        32.75
                    ],
                    [
                        -95.71,
                        32.75
                    ],
                    [
                        -95.66,
                        32.71
                    ],
                    [
                        -95.64,
                        32.72
                    ],
                    [
                        -95.59,
                        32.68
                    ],
                    [
                        -95.6,
                        32.48
                    ],
                    [
                        -95.47,
                        32.37
                    ],
                    [
                        -95.45,
                        32.36
                    ]
                ]
            ]
        },
        "properties": {
            "@id": "https://api.weather.gov/alerts/NWS-IDP-PROD-2485131-2320093",
            "@type": "wx:Alert",
            "id": "NWS-IDP-PROD-2485131-2320093",
            "areaDesc": "Van Zandt",
            "geocode": {
                "UGC": [
                    "TXC467"
                ],
                "SAME": [
                    "048467"
                ]
            },
            "references": [],
            "sent": "2017-08-13T00:03:41+00:00",
            "effective": "2017-08-13T00:03:41+00:00",
            "onset": "2017-08-13T00:03:00+00:00",
            "expires": "2017-08-13T01:00:00+00:00",
            "ends": "2017-08-13T01:00:00+00:00",
            "status": "Actual",
            "messageType": "Alert",
            "category": "Met",
            "severity": "Severe",
            "certainty": "Observed",
            "urgency": "Immediate",
            "event": "Severe Thunderstorm Warning",
            "sender": "NWS Fort Worth TX",
            "headline": "Severe Thunderstorm Warning issued August 12 at 7:03PM CDT expiring August 12 at 8:00PM CDT by NWS Fort Worth TX",
            "description": "The National Weather Service in Fort Worth has issued a\n\n* Severe Thunderstorm Warning for...\nVan Zandt County in north central Texas...\n\n* Until 800 PM CDT.\n\n* At 703 PM CDT, a severe thunderstorm was located near Wills Point,\nmoving east at 25 mph.\n\nHAZARD...65 mph wind gusts and quarter size hail.\n\nSOURCE...Radar indicated.\n\nIMPACT...Hail damage to vehicles is expected. Expect wind damage\nto roofs, siding, and trees.\n\n* This severe thunderstorm will be near,\nCanton around 710 PM CDT.\nEdgewood around 715 PM CDT.\nFruitvale around 725 PM CDT.\nGrand Saline around 735 PM CDT.\nVan around 750 PM CDT.\n\nThis includes Interstate 20 between mile markers 513 and 542.",
            "instruction": "For your protection get inside a sturdy structure and stay away from\nwindows.\n\nContinuous cloud to ground lightning is occurring with this storm.\nMove indoors immediately. Lightning can kill.\n\nHeavy rainfall is occurring with this storm, and may lead to flash\nflooding. Do not drive your vehicle through flooded roadways.",
            "response": "Shelter",
            "parameters": {
                "eventMotionDescription": [
                    "2017-08-13T00:03:00.000-05:00...storm...277DEG...23KT...32.62,-95.97"
                ],
                "hailSize": [
                    "1.00"
                ],
                "windGust": [
                    65
                ],
                "tornadoDetection": [
                    "POSSIBLE"
                ],
                "VTEC": [
                    "/O.NEW.KFWD.SV.W.0313.170813T0003Z-170813T0100Z/"
                ],
                "EAS-ORG": [
                    "WXR"
                ],
                "PIL": [
                    "FWDSVRFWD"
                ],
                "BLOCKCHANNEL": [
                    "CMAS",
                    "EAS",
                    "NWEM"
                ],
                "eventEndingTime": [
                    "2017-08-13T01:00:00Z"
                ]
            }
        }
    },

Tôi đang cố gắng lấy các giá trị từ các khóa trong khóa "Thuộc tính".Điều tôi đang vật lộn là mảng bắt đầu với "thuộc tính" được lồng dưới @Context hay trong "tính năng"?Tôi không quen thuộc với dữ liệu JSON sử dụng @ Keys.

Có nhiều giá trị tôi cần.Nhưng đối với người mới bắt đầu, tôi chỉ sử dụng khóa sự kiện được lồng trong "Tính năng" -> "Thuộc tính" trong đó hầu hết các khóa cho các giá trị tôi cần.Tôi không nhận được đầu ra từ đó.

    <?php

$url = 'http://stream.dfwstormforce.com/json/nat_alerts.json'; // path to your JSON file
$data = file_get_contents($url); // put the contents of the file into a variable
$result = json_decode($data, true); // decode the JSON feed


foreach($results as $result) {
    dump($result); //this will dump the array
    foreach($results['features'] as $data) {
        dump($data['event']);
    }
}

?>

-Thanks

Chỉnh sửa: Đã thêm đề xuất vào mã cho json_decode Added suggestion to code for json_decode