Is there a way to extract messages based on keywords from a JSON structure? Here is an example of the JSON structure:
[{ _id: 123, message: 'hello', username: '1' }, { _id: 456, message: 'world', username: '2'}]
I would like to retrieve all the messages and store them in an array using JavaScript. How can this be achieved? Thank you.