I have an array
var array = [{
"Abigail": ["I feel that anyone breaking the law deserves what they get", "1"],
"Alexandra": ["There comes a time that you can just", "5"],
"Alexis": ["She looks mean anyways.", "2"]
}, {
"Abigail": ["Bet she wishes she hadn't broken the law", "1"],
"Alexandra": ["Bad girls don't wear scarfs.", "5"],
"Alexis": ["That's the look of someone who has lost hope in humanity.", "5"]
}, {
"Abigail": ["She probably wanted this to happen.", "1"],
"Alexandra": ["What did she do to warrent all of this attention?", "5"],
"Alexis": ["I think people just going about it all wrong.", "5"]
}]
I would like to shuffle just the names within the array, but want to keep the order of the name the same.
I tried a bunch of things including this code of the Fisher- Yates Shuffle https://bost.ocks.org/mike/shuffle/. I can only shuffle within the lower level lists but not the names.
Example of a desired outcome:
var arrayShuffled = [{
"Abigail": ["I feel that anyone breaking the law deserves what they get", "1"],
"Alexis": ["She looks mean anyways.", "2"],
"Alexandra": ["There comes a time that you can just stop screaming in peoples ears.", "5"]
}, {
"Abigail": ["Bet she wishes she hadn't broken the law", "1"],
"Alexis": ["That's the look of someone who has lost hope in humanity.", "5"],
"Alexandra": ["Bad girls don't wear scarfs.", "5"]
}, {
"Abigail": ["She probably wanted this to happen.", "1"],
"Alexis": ["I think people just going about it all wrong.", "5"],
"Alexandra": ["What did she do to warrent all of this attention?", "5"]
}]