-
Beta Was this translation helpful? Give feedback.
Answered by
aikrom
Nov 25, 2023
Replies: 1 comment 2 replies
-
Hey! AdonisJS uses the import qs from 'qs'
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
export default class TestController {
public async index({ request }: HttpContextContract) {
const query = qs.parse(request.parsedUrl.query, { depth: 10 });
}
} Also you can try to override the query string somewhere in the middleware (I haven't tested) with Here you can find more about how query string parsing works. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
abdalem
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey! AdonisJS uses the
qs
package to parse the query string and by default, when nesting objects,qs
will only parse up to 5 children. In the controller, you can manually parse a query string of any depth.Also you can try to override the query string somewhere in the middleware (I haven't tested) with
Request.updateQs(...)
Here you can find more about how query string parsing works.