title: Grabbing content from a dictionary that is stored in a text file. [JavaScript]
body: <p>I'm building a Pokemon team builder app. I want to click a button (which displays a Pokemons image so I know who it is) and have the data from a dictionary (image, name, moves, ability, etc.) displayed on the top div under the class &quot;monster&quot; (replacing the egg image). Just not sure where to get started.</p>
  <p>html</p>
  <pre><code>&lt;h2&gt;Current Team&lt;/h2&gt;
      &lt;div id=&quot;your-team&quot; class=&quot;team&quot;&gt;
          &lt;div class=&quot;slot&quot;&gt;
              &lt;div class=&quot;monster&quot;&gt;
                  &lt;img src=&quot;egg.png&quot; alt=&quot;&quot;&gt;
              &lt;/div&gt;
              &lt;div class=&quot;info&quot;&gt;
                  &lt;p&gt;test&lt;/p&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
      &lt;h2&gt;All Pokemon&lt;/h2&gt;
      &lt;div class=&quot;your-options&quot; id=&quot;options&quot;&gt;
          &lt;div class=&quot;all-monsters&quot; id=&quot;all&quot;&gt;
              &lt;ol class=&quot;list-pokemon&quot;&gt;
                  &lt;li&gt;
                      &lt;button&gt;
                          &lt;img src=&quot;treecko.png&quot; alt=&quot;&quot;&gt;
                      &lt;/button&gt;
                  &lt;/li&gt;
  
                  &lt;li&gt;
                      &lt;button&gt;
                          &lt;img src=&quot;grovyle.png&quot; alt=&quot;&quot;&gt;
                      &lt;/button&gt;
                  &lt;/li&gt;
  
                  &lt;li&gt;
                      &lt;button&gt;
                          &lt;img src=&quot;sceptile.png&quot; alt=&quot;&quot;&gt;
                      &lt;/button&gt;
                  &lt;/li&gt;
              &lt;/ol&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  <p>dictionary (stored in a separate text file)</p>
  <pre><code>let pokemon = {
      252: {
          &quot;name&quot;: &quot;Treecko&quot;,
          &quot;type&quot;: &quot;Grass&quot;,
          &quot;ability&quot;: &quot;Overgrow&quot;,
          &quot;height&quot;: &quot;1'08''&quot;,
          &quot;weight&quot;: &quot;11.0lbs&quot;,
          &quot;location&quot;: &quot;Starter Pokemon&quot;,
          &quot;moves&quot;: {
              &quot;Level --&quot;: &quot;Pound&quot;,
              &quot;Level --&quot;: &quot;Leer&quot;,
              &quot;Level 6&quot;: &quot;Absorb&quot;,
              &quot;Level 11&quot;: &quot;Quick Attack&quot;,
              &quot;Level 16&quot;: &quot;Pursuit&quot;,
              &quot;Level 21&quot;: &quot;Screech&quot;,
              &quot;Level 26&quot;: &quot;Mega Drain&quot;,
              &quot;Level 31&quot;: &quot;Agility&quot;,
              &quot;Level 36&quot;: &quot;Slam&quot;,
              &quot;Level 41&quot;: &quot;Detect&quot;,
              &quot;Level 46&quot;: &quot;Giga Drain&quot;,
              &quot;Level 50&quot;: &quot;Energy Ball&quot;
          },
      },
  }
  </code></pre>