I am using the following:
var items = $.map(json.errors, function (error) {
return error + '</br>';
}).join('');
json.errors can be IEnumerable<string>
or just string.
When json.errors is IEnumerable then items is populated with text with a <br>
between each error message. However when json.errors is a string then items is populated with the error string with a <br>
after every character of the string.
Is there some way that I could fix the problem for when json.errors is just a plain string?