Question asked was you are given a map as a template. Given Map -> {"X":"123","Y":"456_%X%"} And you will be given with input as String "%X%_%Y%" In the given input you have replace templates with the values.
Output should be "123_456_123"