title: Idiomatic Elixir to filter a list of maps by specific not null key values?
body: <p>I'm brand new to elixir, and am trying to figure out the correct way to rewrite this ruby method: </p>
  
  <pre><code>def filter_events(events)
    events.select { |event| event[:id].present? &amp;&amp; event[:vhost].present? }
  end
  </code></pre>
  
  <p>in elixir. This is what I have so far:</p>
  
  <pre><code>def filter_events(events) do
    Enum.filter(events, &amp;(Map.has_key?(&amp;1, :id) &amp;&amp; Map.has_key?(&amp;1, :vhost)))
  end
  </code></pre>
  
  <p>Is there a better / more idiomatic way to do this?</p>