I am currently working on a function within a project that is designed to replace instances of
/endpoint/{item.id}/disable/{item.name}
with /endpoint/123/disable/lorem
when the function is provided with the URL and item details.
The item is expected to contain the keys id
and name
.
What is the most effective method for identifying items in the format of {item.KEY}
and substituting them with item.KEY
?