how to display data from api in javascript