One of the challenges I'm facing involves using faker to generate an array of random objects. Here's a snippet of what I have:
{
"image": faker.random.arrayElement([
faker.image.nature(),
faker.image.city(),
faker.image.food()
]),
"price": faker.random.number({ min: 20, max: 300 }),
"beds": faker.random.number({ min: 1, max: 15 }),
"type": faker.random.arrayElement([
"Entire home",
"Private room",
"Shared room"
])
}
However, while all the data is randomized with each load, the image remains the same for every element in the array.
Although different photos appear upon refreshing the page, the images for all elements within the array remain identical.
Any suggestions on how to resolve this issue?