Store and sort scraped data. Javascript

Hey guys im really new to coding as a whole but ive managed to scrape what I want from a forum (using puppeteer) but i dont know how to store and sort this data.
So far the data I scraped I store in variables (lets say x y and z for simplicity) for each forum post
then managed to console.log (x, y, z) for each iteration (aka different forum post)

how do I store this in like a table. It will be aprrox 1 million rows.

x y z
x y z
x y z

I then want to be able to sort this data (group rows where the x value is the same (ie same username etc.