Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

92
Views
Drag and drop with express and mongoose

I have a linktree clone project where you can build your portofolio from multiple urls. At the moment, the links are in a chronological order (when they were put in the database). I want to be able to modify their order but don't know what is the best aproach or where to start. The only thing that I could think of was an array stored in Page Schema with the orders of id urls(named pageLayout). I'm a beginner and still learning

The JSON generated is something like this:

{
"theme": "white",
"banner": "uploads/banners/default.png",
"avatar": "uploads/avatars/default.png",
"pageLayout": [],
"_id": "62825469a716308778488106",
"urlName": "test",
"title": "TEST",
"description": "TEST PAGE",
"category": "Photography",
"socialMedia": {
    "Instagram": "test",
    "Twitter": "test.twitter",
    "Tiktok": "test.tiktok"
},
"__v": 0,
"blocks": [
    {
        "blockType": "links",
        "_id": "628a646534a2f89b190bb309",
        "title": "Learn Blockchain1",
        "user": "628172dff7334877a4ecf19e",
        "pageId": "62825469a716308778488106",
        "__v": 0,
        "links": [
            {
                "display": true,
                "thumbnail": "uploads/linkThumbnails/default.png",
                "_id": "628a732533d84c9cf988993b",
                "blockId": "628a646534a2f89b190bb309",
                "title": "First Project1",
                "url": "www.test.com/ethkasbdj",
                "user": "628172dff7334877a4ecf19e",
                "__v": 0
            },{
                "display": true,
                "thumbnail": "uploads/linkThumbnails/default.png",
                "_id": "628a732533d84c9cf988993b",
                "blockId": "628a646534a2f89b190bb309",
                "title": "First Project2",
                "url": "www.test.com/ethkasbdj",
                "user": "628172dff7334877a4ecf19e",
                "__v": 0
            }
        ],
        "id": "628a646534a2f89b190bb309"
    }
],
"id": "62825469a716308778488106"
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!