title: Reduce array of objects to parameter with the same objects
body: <p>I hope the title is enough self-explanatory but I will try to clarify with a fiddle I've created. There are two arrays, one called tags which is what I currently have and tags_ideal which is what I really want to achieve.</p>
  
  <p>Current state:</p>
  
  <pre><code>var tags = [
    {
      id: 1,
      color: 'red',
      l10n: [
        {
          name: 'Something something',
          lang: 'english'
        },
        {
          name: 'Etwas etwas',
          lang: 'deutsch'
        }
      ]
    },
    {
     id: 2,
     color: 'blue',
     l10n: ...
    }
  ]
  </code></pre>
  
  <p>What I'm after:</p>
  
  <pre><code>var tags_ideal = [
    {
      id: 1,
      color: 'red',
      l10n: {
        'english': {
          name: 'Something something',
        },
        'deutsch': {
          name: 'Etwas etwas',
        }
      }
    },
    {
     id: 2,
     color: 'blue',
     l10n: ...
    }
  ]
  </code></pre>
  
  <p>I have the first case and want to convert all the stuff from l10n so that they don't have a lang: english parameter but rather have an object called english and the name/title inside of that. Below both tags is what I tried to do and what works when I pass just the l10n object into it, but not the whole thing (I do understand why, and now I would like to know how to do what I am really after).</p>
  
  <p>Also, please note that my arrays are not correct at this point. I have appended three dots at the start of the next object just to point out that there is more than one object in my array.</p>
  
  <p>Here's the fiddle:
  <a href="https://jsfiddle.net/cgvpuj70/" rel="nofollow noreferrer">https://jsfiddle.net/cgvpuj70/</a></p>