I'm shuffling an array and getting a weird message in the console.
My JSON file looks like this:
[
{
"id": 1,
"name": "Sushi",
"image": "https://images.pexels.com/photos/1640777/pexels-photo-1640777.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500",
"price": 7.99,
"restaurant": "Sushi Garden",
"city": "Burnaby",
"googleMap": "https://www.google.com",
"keywords": "Lorem ipsum",
"onlineOrders": {
"foodly": "https://www.google.com",
"doorDash": "https://www.daum.net",
"skipTheDish": "https://www.naver.com"
}
},
{
"id": 2,
"name": "Noodle",
"image": "https://images.pexels.com/photos/1640777/pexels-photo-1640777.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500",
"price": 7.99,
"restaurant": "Restaurant Name",
"city": "Burnaby",
"googleMap": "https://www.google.com",
"keywords": "Lorem ipsum",
"onlineOrders": {
"foodly": "https://www.google.com"
}
},
...
And this is my component that shuffles the array of food objects.
import foods from "/json/foods.json";
import _ from "lodash";
...
created: function () {
this.retrievedFoods = foods;
this.randomizeFoodsOrder();
},
data() {
return {
retrievedFoods: [],
};
},
methods: {
randomizeFoodsOrder() {
let temp = foods;
console.log(temp); // Array
this.retrievedFoods = _.shuffle(temp);
console.log(this.retrievedFoods); // Proxy????
},
...
However, I'm getting this Proxy
thing on console log after shuffling.
What could be the issue here? What is changing this to Proxy?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…