For example, for users collection:
const users = [
{
id: 1,
name: 'User 1',
role: 'developer'
},
{
id: 2,
name: 'User 2',
role: 'manager'
},
{
id: 3,
name: 'User 3',
role: 'designer'
},
{
id: 4,
name: 'User 4',
role: 'developer'
},
{
id: 5,
name: 'User 5',
role: 'manager'
},
{
id: 6,
name: 'User 6',
role: 'designer'
},
{
id: 7,
name: 'User 7',
role: 'developer'
},
{
id: 8,
name: 'User 8',
role: 'manager'
},
{
id: 9,
name: 'User 9',
role: 'designer'
},
]
it produces files output:
/developer/
/developer/1
/manager/
/manager/1/
/designer/
/designer/1
.etc