Here is a JSON data example:
{
"email.com": ["<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="ef8a828e8683af8a828e8683c18c8082">[email protected]</a>|username\r"],
"email.de": ["<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="73161e121a1a31a1612316">[email protected]</a>|username"]
}
My objective is to display it in the following format:
email.com
email.de
var data = '{"email.com":["<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a9ccc4c8c0c5e9ccc4c8c0c587cac6c4">[email protected]</a>|username\r"],"email.de":["<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="acc9c1cdc5c0ecc9c1cdc5c082c8c9">[email protected]</a>|username"]}';
var obj = JSON.parse(data);
for (i = 0; i < obj.length; i++) {
document.getElementById('types').innerHTML += '<br>' + obj[i]; // I want to get email.com , email.de
}
<div id="types">
</div>