I'm trying to loop through all elements with the class name steem_verify, and then append " Verified" after the usernames who are verified according to my API. I finally got it working (kind of), but after verified names it says " Verified Verified Verified", so I'm guessing my loop is messed up somewhere.
Here's my code:
$.getJSON("https://steemverify.com/api/verified.json", function (data) {
$.each(data, function (i, item) {
$(".steem_verify").each(function (index) {
var username = $(this).text();
$(data).each(function () {
if (item.username == username) {
$(".steem_verify")[index].append(" Verified");
}
});
});
});
});
$.each(datawith$(data).eachinside it looks 17 flavours of wrong