title: Substitute string with placeholder values coming from JSON object
body: <p>I have a string "Good $timeOfTheDay$, $name$"</p>
  
  <p>$timeOfTheDay$ and $name$ are placeholders whose values are contained in a JSON object. </p>
  
  <pre><code>var content = { "timeOfTheDay" : "evening",
                  "name" : "Jack",  
                  "city" : "New York",  
                  "age" : "25",  
                }
  </code></pre>
  
  <p>Want to substitute the placeholders in the string with the values from the JSON object. The resulting string would be: <strong>"Good evening, Jack"</strong></p>
  
  <p>Want to do this in javascript. This does not involve any interaction with the DOM. </p>
  
  <p>I'm guessing the brute force way to do it would be via writing JS code to do the replace but is there a library or another way to do this?</p>
  
  <p>Appreciate any ideas/help. Thanks!  </p>