Site icon Hip-Hop Website Design and Development

How to get an array of post data from wp_query result?

When run a query with WP_Query method, I got an object. I understand that I can then do the loop to display stuffs. But, my goal is not to display anything, instead, I want to get some post data by doing something like “foreach…”. How can I get an array of post data that I can loop through and get data?