I have an array that looks like this:
{ messages:
[ { username: 'wef', message: 'f', type: 'chat' },
{ username: 'wef', message: 'we', type: 'chat' },
{ username: 'wef', message: 'wefwefwef', type: 'chat' } ] }
How do I loop through all objects in messages
? I tried doing a for loop but that just sends the array itself and not each object.
Thanks for any help