Currently working on a project where the user will create a JSON file that's then read into the system. The fields of one object can be referred to in another object for relevant operations. Something like this:
{
employees: [
{
name: "Mark",
department: "Accounting",
join_date: "09-03-2001",
id: "mark"
},
{
name: "Brenda",
department: "Human Resources"
join_date: "10-12-2005",
id: "brenda"
},
{
name: "Charles",
department: "Sales"
join_date: "02-23-2011",
id: "charles"
}
],
teams: [
{
team_lead_id: "mark",
size: 10
},
{
team_lead_id: "charles",
size: 3
}
]
}
The IDs are supposed to uniquely refer to the elements of a list and prevent the duplication of data, but I'm wondering if it makes sense to call them IDs since they are created by the user and their uniqueness needs to be validated.