getting json on the view