My JSON string(this is what i get after making the request in $.post )-
{"email":"bill gates"}
{"email":"steve jobs"}
{"email":"mark zuckerberg"}
{"email":"cristiano ronaldo"}
{"email":"wayne rooney"}
The code I am using to get the content-
$(document).ready(function() {
var data = new Object();
data.email = "[email protected]";
var dataString = $.toJSON(data);
$.post('templates/chat.php', {
data: dataString
}, function(json) {
$("body").append(json);
});
});
I want to dislay each one of them in an <li> tag.