Get all related rows from a dataset

My schema has a row number, and I’m trying to build a JSONArray with data from a dataset.
Essentially, one to many where the dataset will have multiple rows per row number.
I want to grab all rows from the dataset where the row number matches.

Wondering if this was possible somehow.

Thanks.