From the following array of objects How can I filter all emails containing the word director of the property POST, without distinguishing between uppercase or lowercase, only containing that word?
var regs = [
{EMAIL:"[email protected]", PUESTO:"DIRECTOR"},
{EMAIL:"[email protected]", PUESTO:"SEGURIDAD EXTERNA"},
{EMAIL:"[email protected]", PUESTO:"SEGURIDAD EXTERNA"},
{EMAIL:"[email protected]", PUESTO:"SUBDIRECTOR A"},
{EMAIL:"[email protected]", PUESTO:"BOMBERO"},
{EMAIL:"[email protected]", PUESTO:"BOMBERO"},
{EMAIL:"[email protected]", PUESTO:"SUBDIRECTOR B"}
];
So that I find an array like this:
var filterRegs =['[email protected]','[email protected]','[email protected]'];