I am getting API response like this.
{
"message": "The password needs at least %1 characters. Password should be having %param2 special characters in it. Create a new password and try again.",
"parameters": [
"8",
"param2test"
]
}
Here I should search if I have %[string] in the response, if its there I need to replace %1 with the first array element of parameters, %2 with second and so on. There could be n number of parameters. How can I do this in React?