function toBoolean(value)
    {
        var result = { "true" : true, "false" : false }[value];
        return result == null ? value : result;
    }
Attempts to convert string to boolean.
@param {String} value Input string.
@return {Boolean} Returns true if input was "true", false if input was "false" and value otherwise.