using json api to get data