« first day (4326 days earlier)      last day (844 days later) » 

05:09
I just want to get property category through console.log (res.category)
 
5 hours later…
10:33
In middleware chain last function give response to a request is this last function counted as middleware??
Like,router.get("/category/:categoryId",isAuth,isAdmin,read) is read counted as middleware like isAuth and isAdmin or as a normal function?
10:52
@OlegValteriswithUkraine r u there?
11:04
Anyone there?
11:16
Hello everyone, I need some help here. My array looks like this:
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
        }
    ]
]
What's a good way to achieve this:
[
    [
        [
            {
                "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
single arrays grouped by date (x)
After many tries I'm not able to find a right solution...I believe I must use .reduce, but how, it's difficult to find a good example somewhere on the web
 
3 hours later…
14:33
@OlegValteriswithUkraine please answer my question, I am a beginner in mern stack please help
 
2 hours later…
16:32
Please answer questions
 
2 hours later…
18:44
I end up using this:
const groupBy = (x, f) => x.reduce((a, b) => ((a[f(b)] ||= []).push(b), a), {});

« first day (4326 days earlier)      last day (844 days later) »