const arr = [{ id: 1, username: "sdjb" }, { id: 3, username: "skdjh" }, { id: 5, username: "" }, { id: 5, username: "" }, { id: 5, username: "" }, { id: 5, username: "" }, { id: 5, username: "" }];
var filtered = arr.filter(function(idx) { return idx.username != ""; });
console.log(filtered);