How to get element from multidimensional associative array?

there's such an array
{ '1':
 [ TextRow {
 from_user_id: '46',
 to_user_id: '1',
 message: 'Allokha',
 write_data: 2019-06-01T06:37:28.000 Z
 read_status: 0 },
 TextRow {
 from_user_id: '46',
 to_user_id: '1',
 message: 'yeah kas of jackapoo',
 write_data: 2019-06-01T16:58:35.000 Z
 read_status: 0 },
 TextRow {
 from_user_id: '46',
 to_user_id: '1',
 message: 'mn,mn',
 write_data: 2019-06-03T05:10:05.000 Z
 read_status: 0 },
 TextRow {
 from_user_id: '46',
 to_user_id: '1',
 message: ",
 write_data: 2019-06-03T05:10:05.000 Z
 read_status: 0 },
 TextRow {
 from_user_id: '46',
 to_user_id: '1',
 message: 'hhljhlkjhlkjhjk',
 write_data: 2019-06-04T03:58:14.000 Z
 read_status: 0 },
 TextRow {
 from_user_id: '46',
 to_user_id: '1',
 message: 'bbfvddfdbv',
 write_data: 2019-06-04T04:01:38.000 Z
 read_status: 0 },
 TextRow {
 from_user_id: '46',
 to_user_id: '1',
 message: ",
 write_data: 2019-06-04T04:01:38.000 Z
 read_status: 0 },
 TextRow {
 from_user_id: '46',
 to_user_id: '1',
 message: 'AA??',
 write_data: 2019-06-04T20:09:44.000 Z
 read_status: 0 } ] }

as a javascript array and display all message
for example
$('div').append('<p>'+value['message']+'</p>');
Where did this array. This is the output from the database in nodejs using the library mysql2, and this array I put into the console, and from where copied. Why and how they formed TextRow I don't know, honestly
March 23rd 20 at 19:13
1 answer
March 23rd 20 at 19:15
Solution
An array of your question is invalid. If you throw incomprehensible string TextRow, something like this:

const data = exmapleArray['1'];

data.forEach(dataItem => $('div').append("+ dataItem.message +"));
@Destini95, what do you mean not valid? very valid!!!

class Test{
constructor(val){
this.method(val);
}
method(val=0){
 this.value = val;
}
}

var a = [
 new Test(),
 new Test()
];

console.log(a);


and the conclusion:
[ Test, {value: 0 }, Test { value: 0 } ] - arnoldo8 commented on March 23rd 20 at 19:18
I added the question - Elvera_Ebe commented on March 23rd 20 at 19:21
@arnoldo8, Very You please do not confuse the output of the command console.log and structure a valid javascript array. - Destini95 commented on March 23rd 20 at 19:24
@Destini95sorry, don't put it right. Your comment I wanted to say about the fact that the author, as I posted in the question the output console.log() obtained from it is valid array, and demonstrated an example. Given that the output console.log() different from JSON.stringify() for obvious reasons, and in this case to give a more complete picture of the origin of the displayed data, it is logical to assume that the demonstration given does not make sense to reinvent the wheel, but to publish the data in the format of the output console.log(). - arnoldo8 commented on March 23rd 20 at 19:27

Find more questions by tags JavaScript