How can I upload files using multer without knowing the fieldname

Can someone help me…I am new on multer and I don’t know how to upload files based on their key or fieldname

So these are my data…

    const items = {
      1: [], // array of files
      2: [], // array of files
      ...
    }

The problem is I don’t know what should I pass on multer upload.fields() because that data could have 1 or more items.

Thank You!

PS. I hope you guys understand what I’m saying :3