I have a list of colors : [‘black’,‘white’,‘red’,‘blue’,‘green’,‘yellow’,‘orange’,‘purple’]
I have two fields that have random sample of that list
"likes " & “dislikes”
I can use a JsonArray and use the following code:
[‘black’,‘white’,‘red’,‘blue’,‘green’,‘yellow’,‘orange’,‘purple’].sample(3).join(’,’)
and this will give me a random sample, but…
How can I make sure that the sample in “dislikes” excludes the colors already chosen in “likes”?