Obtaining the value of SON query into PHP : Hi please am trying to assign the value of town_B to a variable in PHP.
I tried using the mothod below but no success. Please any suggestions will be appreciated
$varx = $update["result"]["parameters"]["town_two"];

Below is the JSON response

    {
      "id": "86726c74-cb52-4f1e-983d-1bc68d8c4f9c",
      "timestamp": "2018-02-22T18:03:12.964Z",
      "lang": "en",
      "result": {
        "source": "agent",
        "resolvedQuery": "Disneyworld CA",
        "action": "sayHello",
        "actionIncomplete": false,
        "parameters": {
          "town_B": [
            "CA"
          ],
          "town_A": "Disneyworld"
        },
        "contexts": [],
        "metadata": {
          "intentId": "65bc2f1f-e127-44de-bd3b-915c8865f472",
          "webhookUsed": "true",
          "webhookForSlotFillingUsed": "false",
          "webhookResponseTime": 1047,
          "intentName": "Geo"
        },
        "fulfillment": {
          "source": "agent",
          "messages": [
            {
              "type": 0,
              "speech": "Please check for correct input"
            }
          ]
        },
        "score": 1
      },
      "status": {
        "code": 200,
        "errorType": "success",
        "webhookTimedOut": false
      },
      "sessionId": "c3de9b17-6cd6-43dc-bf12-6844a6b0930e"
    }