Hey guys i have this inputs
<input name='text[en]' value='aaaaaa' />
<input name='text[fr]' value='bbbb' />
I can obtain values with each using $(this).val(), but how i can obtain en,es that are inside de name
this.name
Will get you the full string like 'text[en]'. Then you can use a regex or substring to find the two letter code you are looking for.
An example would be:
var code = this.name.substring(5,6);
EDIT: Updated to reflect Gedrox's simplification.
this.name will be simpler.