Retreiving json data and parsing it to be used