Here is my Json data
[Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object]
0: Object
From_Id: 5
Message: "
↵ did you have dinner???"
Started_Date: "2014-07-29 11:29:41"
To_Id: 5
Upadted_Date: "2014-07-29 03:29:41"
__proto__: Object
1: Object
From_Id: 5
Message: "ya i did what about you???
↵ "
Started_Date: "2014-07-29 11:51:41"
To_Id: 1
Upadted_Date: "2014-07-29 03:51:41"
__proto__: Object
2: Object
3: Object
4: Object
5: Object
6: Object
7: Object
8: Object
9: Object
10: Object
11: Object
length: 12
__proto__: Array[0]
I want to add each message from object to div message_data one after other....i have used the code below...so that message_data div contains all the messages....
var obj = eval(data);
console.log(obj);
$.each(obj, function (index,Object) {
var Id = Object.Message;
$('#message_data').html(Id).toString();
});
But it is displaying only the last object message.. how do i fix this???
Note: Iam using this inside timer function so i can not use append ,, which keeps adding same contents after timer seconds...
htmlcontent, so will display only last message.