title: Javascript - The quickest and most efficient way to replace object-based values in text
body: <p>I have an object that looks like this:</p>
  
  <pre><code>var obj = {
      a: "text",
      b: "text 2",
      c: "text 3",
      ...
  }
  </code></pre>
  
  <p>and I have a bunch of strings that look like this:</p>
  
  <pre><code>var stringA = "http://{{a}}.something.com/",
      stringB = "http://something.{{b}}.com/",
      stringC = "http://something.com/{{c}}";
  </code></pre>
  
  <p>I want to replace <code>{{(\w)}}</code> with it's equivalent by going through <code>obj</code> and checking if it has my matched value for every string, but I'm sure there is a better and faster way to do so.</p>
  
  <p>Any ideas?</p>