I am using Nuxt.js (Nuxt version is 2)
I have query params on my page https://localhost:9000/applicant?period_manual[]=2022-10-09&period_manual[]=2022-10-19
I need to get period_manual
params from query.
If I trying to do
console.log(this.$route.query.period_manual) //- It is undefined
console.log(this.$route.query) //- this outputs {period_manual[]: ["2022-10-16", "2022-10-25"]}
console.log(this.$route.query.period_manual[]) //- ESLint error - ESLint: Parsing error: An element access expression should take an argument
How I can get data of period_manual[] from query request?
CodePudding user response:
Give a try to that one
this.$route.query['period_manual[]']