Converting numbers in a number range within a table to a list of numbers

Hey, I currently have a number range that is within a table that I would like to convert into a list of numbers. Does anyone have any tips to be able to do so?

newtable = {}
for i, v in pairs(mytable) do
 if v > min and v < max then
   table.insert(newtable, v)