How can I identify distinct elements in a JSON array using JavaScript? Below is the example of my JSON array. I need to determine the size of unique elements.
[
{
"_id": "5aaa4f8cd0ccf521304dc6bd",
"email": "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="5f3e3d3c1f38323e3633713c3032">[email protected]</a>"
},
{
"_id": "5aaa50a0ac40d32404c8bab7",
"email": "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="2858595a684f45494144064b4745">[email protected]</a>",
},
{
"_id": "5aa8ace3323eeb001414a2c5",
"email": "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c9b1b0b389aea4a8a0a5e7aaa6a4">[email protected]</a>"
},
{
"_id": "5aa86645323eeb001414a2af",
"email": "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="3657545576515b575f5a1855595b">[email protected]</a>"
}
]
The expected outcome should be 3.