title: How to replace underscores with spaces?
body: <p>I have an array with objects inside of it, a few of the objects contain an underscore in the string.</p>
  <p>Example:</p>
  <pre><code>{&quot;name&quot;: &quot;My_name&quot;}
  </code></pre>
  <p>But I'm calling the name function in multiple places, one such place is in an image tag where the underscore is necessary, using JavaScript I want to select a certain div with the name in it and replace the underscore with space.</p>
  <p>Example:</p>
  <pre><code>&lt;div&gt;
   &lt;div class=&quot;name&quot;&gt;
    My_name
   &lt;/div&gt;
   &lt;img src=&quot;My_name.jpg&quot;/&gt;
  &lt;/div&gt;
  </code></pre>
  <p>In the <code>div.name</code> I want it to say <code>My name</code> instead of <code>My_name</code>.</p>