I have an array with objects inside of it, a few of the objects contain an underscore in the string.
Example:
{"name": "My_name"}
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.
Example:
<div>
<div class="name">
My_name
</div>
<img src="My_name.jpg"/>
</div>
In the div.name
I want it to say My name
instead of My_name
.