I have an array and an array of objects
'neededPermissions: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]',
'permissions:[{permissionType: 1, teamId: 1},{permissionType: 4, teamId: 1},{permissionType: 7, teamId: 1},{permissionType: 8, teamId: 1},{permissionType: 10, teamId: 1}]'
// route with neededPermissions array must include with the permissions in current user, then the user will have access to the route // permissions.includes(neededPermissions)=true => user have access to the route
I know how it works for two arrays, but How to work with array and array of objects?