let data = [ [ { "x": "8/9/2022", "y": 0.43 }, { "x": "8/15/2022", "y": 0.63 } ], [ { "x": "8/9/2022", "y": 0.5 }, { "x": "8/9/2022", "y": 0.2 }, { "x": "8/11/2022", "y": 0.7 } ] ]
[ [ [ { "x": "8/9/2022", "y": 0.43 } ], [ { "x": "8/15/2022", "y": 0.63 } ], ], [ [ { "x": "8/9/2022", "y": 0.5 }, { "x": "8/9/2022", "y": 0.2 } ], [ { "x": "8/11/2022", "y": 0.7
const groupBy = (x, f) => x.reduce((a, b) => ((a[f(b)] ||= []).push(b), a), {});