]/g, '\\$&');
}
function escapeJSONString(str) {
  return str
    .replace(/\\/g, '\\\\')   // Escape backslash
    .replace(/"/g, '\\"')      // Escape double quote
    .replace(/\n/g, '\\n')     // Escape new line
    .replace(/\r/g, '\\r')     // Escape carriage return
    .replace(/\t/g, '\\t')     // Escape tab
    .replace(/\f/g, '\\f');    // Escape form feed
}
function isArr(obj) {
    // checks for null and undefined
    if (obj == null) {
        return false;
    }
    return (obj