How to verify JSON data with AngularJS