Use reject method when getting a json file