I am trying to sort data that looks like this:
{
"Params": [
["section", "North"],
["monitor", "Single Monitor"],
["section", "North"],
["monitor", "Dual Monitor"]
]
}
Into something that looks like this:
{
"section": [
"North"
],
"monitor": [
"Single Monitor",
"Dual Monitor"
]
}
But I am currently having issues, I've tried a few different things such as concatenating the arrays together in a loop, or even using lodash's uniq function but every time I get a non desired result.
Thanks in advance for any help