I have an object that looks like this:
var obj = {
a: "text",
b: "text 2",
c: "text 3",
...
}
and I have a bunch of strings that look like this:
var stringA = "http://{{a}}.something.com/",
stringB = "http://something.{{b}}.com/",
stringC = "http://something.com/{{c}}";
I want to replace {{(\w)}} with it's equivalent by going through obj 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.
Any ideas?