Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

277
Views
Axios Get Request returned [Proxy proxy] - Flask & Vue.js

I use component in i rendered page. Rendered page have an object array, it's kpi_list[]. I 'do axios get request' in rendering page.

     axios.get(URL + "/KPI/get_by_category/1").then(response=>{
          for (const data in response.data) {
              this.kpi_kalite.push(JSON.parse(JSON.stringify(response.data[data])))
              console.log(Object.values(this.kpi_kalite))
           }  
           .
           .
           .

Output:

(2) [Proxy, Proxy]
      0: Proxy {id: 1, base: 1, name: 'A', searchable_name: 'A', 
         user: '1', …}
      1: Proxy {id: 5, base: 1, name: 'B', searchable_name: 'B', 
         user: '1', …}
    length: 2
    [[Prototype]]: Array(0)

shouldn't I see it like this?

[
   {id: 1, base: 1, name: 'A', searchable_name: 'A', 
     user: '1', …},
   {id: 5, base: 1, name: 'B', searchable_name: 'B', 
     user: '1', …}
]

And whats is [Proxy, proxy]?

I send kpi_kalite array to component as a prop. In component mounted, i try things like:

  mounted() {
    console.log(this.kpi_kalite[0]) 
    console.log(Object.values(this.kpi_kalite))
},

OUTPUT:

Proxy {id: 1, base: 1, name: 'A', searchable_name: 'A', user: 
       '1', …}
(2) [Proxy, Proxy]

There is a problem, right? These are not the objects or array of objects I need to see.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

this is normal! vue 3 uses proxies to make the properties you define in the data reactive, consequently going to log the object you see the proxy that contains the true value. to see the true value in console you should do like

console.log(JSON.parse(JSON.stringify(this.yourValue)))

if you want to read more

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!