Handling duplicate params

I’m using Strapi v3, but perhaps this applies to v4.

I noticed duplicate query params are automatically merged into an array. Is this intentional? What’s the benefit?

Is it upon a dev to manually check for this when digesting params in a custom controller?

Any suggestions on how to control this at a high-level… ie to NOT merge duplicate query params, instead only take the first instance and ignore the rest.

Duplicate query params:


ctx.query {
  _limit: [ '50', '30' ]


Single query param:


ctx.query {
  _limit: '50'