Adding object into an object

Adding object into an object
0

#1

Hello everyone,

I am having this data after joining two tables in nodejs and I am trying to add the users object into stories object. Can somebody help me with any ideas?

Thank you! :slight_smile:

[ RowDataPacket {
    stories:
     { id: 1,
       title: 'bla bla bla',
       story: 'bla bla bla',
       created_at: 2018-02-17T11:01:55.000Z 
     },
    users: 
     { username: 'peter' } 
  },
    RowDataPacket {
    ...
    } 
]

#2

Can you show us what you want the array to look like after the modification you are requesting?