title: Convert array of objects to plain object using Ramda
body: <p>How can I convert an array of objects to a plain object?
  Where each item of the array is an object with only one key:value pair and the key have an unknown name.</p>
  
  <p>I have this</p>
  
  <pre><code>const arrayOfObject = [
      {KEY_A: 'asfas'},
      {KEY_B: 'asas' }
  ]
  let result = {} 
  const each = R.forEach((item) =&gt; {
     const key = R.keys(item)[0]
      result[key] = item[key]
  })
  return result
  </code></pre>
  
  <p>But I dislike that solution because the <code>forEach</code> is using a global variable <code>result</code> and I'm not sure how to avoid side effects here.</p>