json code to fetch data and display