I'm having a problem with the incompatibility between Chrome/Firefox and Internet Explorer regards to using a variable as key in creating an array. Bellow it's my code. In IE11 I have the error: SCRIPT1028: Expected identifier, string or number.
What should I change in order to work in IE11? I tried several ways, but without success. Thank you.
var form_r = [];
$(".form_tracing input[type=text]").each(function() {
id_input = $(this).attr('id');
values= $(this).val() != '' ? $(this).val() : "";
form_r.push({ [id_input] : values});
});