title: Is it possible to convert e.target.property to a value and use it to reference an object?
body: <p>The simplified code below does not work but I hope it helps to illuminate the idea I'm testing.</p>
  
  <p><code>e.target.id</code> returns the name of the id that initiated the function call.  In this case it's the id <code>target</code>.  Since <code>target</code> is also an object I thought maybe I could reference a key inside the <code>target</code> object.  In this case <code>.name</code>. As structured this does not work at all.  Do I need to process <code>e.target.id</code> before I use it as a reference?  Is this possible at all?</p>
  
  <p>1) I'm aware this might possibly be categorized under worst practices.</p>
  
  <p>2) I'm testing how far I can push JS.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>'use strict';
  
  var target = {
    name: 'it worked'
  }
  
  document.getElementById('target').addEventListener('click', myFunction);
  
  function myFunction(e) {
    alert(e.target.id.name);  //dies right here
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="target"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>