When shuffling an array, I keep encountering a strange message in the console.
Below is a snippet of my JSON file:
[
{
"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"
...
In my component, I have implemented a method to shuffle 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????
},
...
After shuffling, an unexpected Proxy
appears in the console log. Any insights on what might be causing this issue?
https://i.sstatic.net/k7fuJ.png
What could possibly trigger this transformation into a Proxy object?