More efficient way to write code / avoid duplicate code
I would like to know if there is a efficent way to wrtie this type of code to filter an array of objects.
Currently if have a lot of lines of duplicated code. Not that sexy, i know.
I would like to know if there is a efficent way to wrtie this type of code to filter an array of objects.
Currently if have a lot of lines of duplicated code. Not that sexy, i know.