---
# System prepended metadata

title: Task 1 - Web Dev (JS Task)

---

# Task 1 - Web Dev (JS Task)

Suppose you have a group of emails, names and domains of your society members like 
```javascript=
const members = [
    {
        email: "1928045@kiit.ac.in",
        name: "Mr. X",
        domain: "Web Dev"
    },
    {
        email:"1928044@kiit.ac.in",
        name: "Mr.Y",
        domain: "Video Editing"
    },
    {
        email: "2085000@kiit.ac.in",
        name: "Mr. Z",
        domain: "Web Dev"
    },
    {
        email: "1885000@kiit.ac.in",
        name: "Mr. Z",
        domain: "App Dev",
    },
    {
        email: "19889223@kiit.ac.in",
        name: "Jane Doe",
        domain: "Web Dev",
    },
    {
        email: "18850089kiit.ac.in",
        name: "Johana",
        domain: "Web Dev"
    },
]
```

**Task** :  
Prepare a script to sort the members first on the basis of domain and then by roll number (Senior to Junior [18xxxxx, 19xxxxxx, 20xxxxxx]). *The roll number sort must be dynamic like the program should take any other roll number like 21xxx or 22xxx*

Result Array should look like (example for reference)

```json=
[
    "Web Dev":[
        {
            email: "18xxxxx@kiit.ac.in",
            name: "some"
        },
        {
            email: "19xxxx@kiit.ac.in",
            name: "many"
        },
        {
            email: "20xxxx@kiit.ac.in",
            name: "where",
        }
    ],
    "App Dev"  :[
        {
            email: "18xxxxx@kiit.ac.in",
            name: "some"
        },
        {
            email: "19xxxx@kiit.ac.in",
            name: "many"
        },
        {
            email: "20xxxx@kiit.ac.in",
            name: "where",
        }
    ],
    "Some Other Domain" : [
        ...
        ...
        ...
    ],
        ...
        ...
        ...
]
```

Use the data provided at the top of the doc and use the site https://onecompiler.com/javascript to code.

