Elton Souza
Elton Souza

Reputation: 162

How to get the values from object Proxy and Pass to local Variable?

I need get a list of devices (video and Input/output audio) using a navigator.mediaDevices.enumerateDevices(). First, i create one function that returns the result to another page however using a console.log(result) i get one proxy object. How to get this result and Pass to local Variable?

enter image description here

Upvotes: 1

Views: 5082

Answers (1)

Alireza Safari
Alireza Safari

Reputation: 216

proxies are either created by vue or asynchronous job, in your problem you don't need to do anything your array is accessible like a normal array you can assign result value to any variable you want and it works just fine.

Upvotes: 2

Related Questions