'Is there a way to get records in mongodb which satisfy more than 80% of the requirements in a field?

Lets say I have my requirements in an array like so

const requirements = ['a', 'b', 'c', 'd']

All my records in mongodb have an array field called skills. I want to get all the records that have at list 80% of the retirements in their skills field.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source