retrieving json data and logging it