I have an input field that looks like this:
I was trying to change
You need to to escape [ and ] using \ but \ is also special character so we escape it also.
so we escape using \\
jQuery('[name="submitted\\[event_email\\]"]').val('test');
Attribute Equals Selector [name="value"]
Fiddle Demo
There is no need to escape [ and ] as it is wrapped in quotes (i.e It is string)
jQuery('[name="submitted[event_email]"]').val('test');
// ^ ^