The following would be a valid JSON response:
[
{JSON},
{JSON},
{JSON},
{JSON}
]
Since your JSON is malformed, simply fix it on the server side. The following code is a bit more brief than what EndangeredMassa suggested and it avoids adding a comma in between braces enclosed in quotes. I'm not so good at RegEx to figure it out with a single .replace().
var string = "{\"key\":\"val}{ue\"}{'key':'val}{ue'}{ \"asdf\" : 500 }";
var result = string.match(/('.*?')|(".*?")|(\d+)|({)|(:)|(})/g);
var newstring = "";
for (var i in result) {
var next = parseInt(i) + 1;
if (next <= result.length) {
if (result[i] == "}" && result[next] == "{") {
newstring += "},";
}
else {
newstring += result[i];
}
}
}
To loop through the JSON objects use the following:
$.each(eval(newstring), function() {
//code that uses the JSON values
alert(this.value1);
alert(this.value2);
});