function replaceJsonStringify( key, value1 ) {
var $edit = $("#trafficLog");
var currentValue = $edit.val();
var jsonConnect = { "time":getLongTime(), [key] : value };
var jsonObj = JSON.stringify(jsonConnect);
var newValue = jsonObj + "<br>" + currentValue;
$edit.val(replaceBR(newValue)); }
replaceJsonStringify( "connectFlag", connect );
I want to rename the json key's value.
The above code works fine in Chrome, but it is not working in IE11, 10..
I want to know how to rename the json key's value.
The problem in the code is " [key] : value "
IE debugging : SCRIPT1028: Expected identifier, string or number.
Please answer about this problem.