title: How to check if specific key array element exists?
body: <p>i have my view in twig </p>
  
  <p>and i have an array which has or hasnt key value i need how to check it if its exist ?</p>
  
  <p>example <code>{{ weather.wind.deg }}</code> and for current moment its possible there is no wind deg so the weather.wind array will not contain an element witch key deg
  how to check it if it has it or no ?
  maybe i should do it before i past this to my view ?
  somewhere here ?</p>
  
  <pre><code>$app-&gt;get('/', function () use ($app) {
      return $app['twig']-&gt;render('index.html.twig', array(
              'weather' =&gt; $app['weather_service']-&gt;get($app['location_service']-&gt;get()),
              'location' =&gt; $app['location_service']-&gt;get())
      );
  });
  </code></pre>