// Set the number of iterations
const iterations = 1
// object to store the samples
const samples = {};
for (let i = 0; i < iterations; i++) {
samples[crypto.randomUUID()] = crypto.randomUUID();
}
// Get an array of the keys in the samples object
const keys = Object.keys(samples)
// Create an empty array to store the key-value pairs as two-element arrays [Required by Map]
const initial = []
for (let i = 0; i<keys.length;i++) {
initial.push([keys[i], samples[keys[i]]])
}
// initial schema: [key,value][]
const map = new Map(initial)const map = new Map(Object.entries(samples))// Get an array of the keys in the samples object
const keys = Object.keys(samples)
// create a new empty Map
const map = new Map()
for (let i = 0; i<keys.length;i++) {
// assign properties via set
map.set(keys[i], samples[keys[i]])
}