Can someone help me with this issue? I can only see Jimmy Cricket's name displayed, but I want to see all the names in li tags. Any assistance would be greatly appreciated.
<ul id="members"></ul>
<script>
var teammembers = [
{"name":"John Doe", "profile":"/img/profile/user1.jpg", "position":"President", "email":"<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="caafa7aba3a68aafb2aba7baa6afe4a9a5a7">[email protected]</a>", "phone":"242-abcd"},
{"name":"James Bond", "profile":"/img/profile/user2.jpg", "position":"Vice President", "email":"<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a898989fe8cdd0c9c5d8c4cd86cbc7c5">[email protected]</a>", "phone":"242-0007"},
{"name":"Jimmy Cricket", "profile":"/img/profile/user3.jpg", "position":"Vice Cricket", "email":"<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="30534259535b5544705548515d405c551e535f5d">[email protected]</a>", "phone":"242-wxyz"}
];
for (var i = 0; i < teammembers.length; i++) {
document.getElementById("members").innerHTML = "<li>" + teammembers[i].name; + "</li>"
}
</script>