1let pattern = "/used-cars/<city_name>/<location>/<car_name>-cars-for-sale"
2let matches = pattern.match(/<.+?>/g);
3const newArray = matches.map((match) => match.replace(/[<>]/g, ''));
4let object = {};
5newArray.map((item, index) => {
6 object[item] = '';
7});
8console.log(object)
9