I have a object like this:
let data = {
url: "https://test.ir/apps/:type/:id/",
params: {
id: "com.farsitel.bazaar",
type: "xyz",
},
query: {
ref: "direct",
l: "en",
},
};
I want to replace :type and :id in url with equivalent key to each from params object. what is the best solution in javascript?