0

I'm working with react/redux stack, and I have a section with dynamic state. I have this structure

state:{formvalues:{email1:'',confirmEmail1:'',email2:'',confirmEmail2:'', etc }}

with dynamic emails, I need to check if email1 is equal confirmEmail1 and the same thing for every mail.

I have found a solution with eval

v = `props.formValues.email${e} !== props.formValues.email${e}`;
eval(v);

And it work, but I cannot use the eval I tried to use the template string in some differents way, but I have not found the solution, I really hope that someone could help me,

Thank you very much for your help

0 Answers0