I have an object in javascript for settings for dataTables.
var dataTableSettings = {
"iDisplayLength": 25,
"bLengthChange": false,
"bSortClasses": false,
};
I then have an if statement to add another option to the object:
if (last_location) {
dataTableSettings.push(
"oSearch": {"sSearch": last_location}
);
}
I know that doesn't work because push() doesn't work on objects, how do I add to the object options list?