title: How to convert query string to Map in Groovy
body: <p>I would like to split the below query string with <code>;</code> delimiter and convert to a map. So that I can access the values iPhone, 6s Plus and 2016 by using the key.</p>
  
  <pre><code>def query = type=iPhone;modelName=6s Plus;year=2016
  def result = query .split(';')
  println result
  </code></pre>
  
  <p>I want to access the value like this - <code>result.getAt('type'), result.getAt('modelName')</code></p>
  
  <p>I tried the below approach - but it's not working as expected</p>
  
  <pre><code>Map&lt;String,String&gt; response = result.collectEntries{
          [
              it.type,
              it.modelName,
              it.year
          ]
      }
  </code></pre>
  
  <p>How can I achieve this in Groovy?</p>