I'm having some serious trouble getting the index function to iterate through each of the user's stocks to obtain the current market price. It correctly outputs a list of the user's stocks along with the sum of shares owned of each stock, but I can't get it to output the current price of each stock (and also the total current value of each stock). Any help would be very much appreciated as always.
Link to the code and the html page: https://gist.github.com/choaimeloo/e21a4eb13790becfa3a43a2ba6a91220