I have a java function where I am writing following parameters randomly to a .json file
const extraMetadata = () => ([
{
display_type: "boost_number",
trait_type: "Stamina",
value: Math.floor(Math.random() * 50),
},
{
display_type: "boost_number",
trait_type: "Strength",
value: Math.floor(Math.random() * 50),
},
{
display_type: "boost_number",
trait_type: "Aggressiveness",
value: Math.floor(Math.random() * 50),
},
{
display_type: "boost_number",
trait_type: "IQ",
vvalue: Math.floor(Math.random() * 50),
},
{
display_type: "boost_number",
trait_type: "Bravery",
value: Math.floor(Math.random() * 50),
},
{
display_type: "boost_number",
trait_type: "Nerdy",
value: Math.floor(Math.random() * 50),
},
{
display_type: "boost_number",
trait_type: "Coolness",
value: Math.floor(Math.random() * 50),
},
]);
I am printing these variable like 10,000 times in 10,000 .json files. Where each file will have below values printed randomly.
Results inside the .json file

How can I make sure these entire parameters are not printed the exact same way.
If one of the .json file contains below values then I don't want the next randomly generated .json file to contain the same values for parameters. In that case, if same values are found in the parameters then regenerate next random number until no matches are found.
In other words, i dont want any .json to contain exact same values for all variables
"trait_type": "Stamina",
"value": 19
"trait_type": "Strength",
"value": 47
"trait_type": "Aggressiveness",
"value": 35
"trait_type": "IQ",
"vvalue": 33
"trait_type": "Bravery",
"value": 23
"trait_type": "Nerdy",
"value": 13
"trait_type": "Coolness",
"value": 12
Below is the line which pushes the values to single .json file
attributes: [...attributesList, ...extraMetadata(),],