Get courses and print as json format