title: Elixir Phoenix pattern matching "params"
body: <p>I am struggling to understand pattern matching in my specific case; I'm trying to get the values from <code>params</code>, which I think is a struct, in a Phoenix controller.</p>
  
  <p>Typing <code>params</code> in <code>iex</code> results in </p>
  
  <pre><code>%{"edit" =&gt; "93213e66-a15e-11e6-8bc7-38c986312498",
    "job_slug" =&gt; "7759-tkhkjd-test"}
  </code></pre>
  
  <p>However, running the following command:</p>
  
  <pre><code>pry(7)&gt; {edit, job_slug} = params
  </code></pre>
  
  <p>throws this error:</p>
  
  <pre><code>** (MatchError) no match of right hand side value: %{"edit" =&gt; "93213e66-a15e-11e6-8bc7-38c986312498", "job_slug" =&gt; "7759-tkhkjd-test"}
       (stdlib) :erl_eval.expr/3
  </code></pre>
  
  <p>How do I correctly pattern match against <code>params</code>?</p>