Iterate multiple files inside the data/ folder

Hi there,

I’m setting up my first static website with Middleman. I have a bunch of JSON files in the data/ folder that I need to parse and convert into pages.

I can access an individual file’s json data using data.<filename>.key.

Is there a way I can iterate through the many files sequentially and do a

data.<files_in_this_folder>.each do |f|
  # do something here
end