title: Getting just one value from the array
body: <p>I was able to get an array, but now I need to get only one value <code>[type]</code> the one that says <code>[type] =&gt; charge.succeeded</code>. Would it be something like <code>$type = $value[0]['type'];</code>? I want to use it as </p>
  
  <pre><code>    if ($type == "charge.succeeded") { echo "Do something" };
  </code></pre>
  
  <pre><code>foreach ($input as $key =&gt; $value) {
  
      print_r($input);
  }
  </code></pre>
  
  <p>=</p>
  
  <pre><code>Array
  (
      [created] =&gt; 1326853478
      [livemode] =&gt; 
      [id] =&gt; charge.succeeded_00000000000000
      [type] =&gt; charge.succeeded
      [object] =&gt; event
      [request] =&gt; 
      [pending_webhooks] =&gt; 1
      [api_version] =&gt; 2018-10-31
      [data] =&gt; Array
  )
  </code></pre>