title: How to create list of dictionaries from list of items in javascript?
body: <p>I'd like to convert a list of items into a list of dictionaries. See below for my example. </p>
  
  <pre><code>list_of_items = ['a','b','c','d']
  
  
  desired_result = [{'name':'a'},{'name':'b'},{'name':'c'},{'name':'d'}]
  </code></pre>
  
  <p>My attempt:</p>
  
  <pre><code>function myAttempt(list_of_items){
     list_of_items.forEach(function (i) {
    return {'name':i};
   });
    return list_of_items
  };
  
  myAttempt(list_of_items)
  </code></pre>