title: How can I convert an array to an object by splitting strings?
body: <p>I have an array like below:</p>
  
  <pre><code>["gender-m", "age-20", "city-london", "lang-en", "support-home"]
  </code></pre>
  
  <p>I tried to generate a JSON object:</p>
  
  <pre><code>{"gender":"m", "age":"20", "city":"london", "lang":"en", "support":"home"}
  </code></pre>
  
  <p>One solution I can think of is using FOR loop to make it, but I am sure there are elegant solutions for this. Any suggestions, please help me.</p>