I have the following json
success{ "fname": [ "The fname field is required." ], "lname": [ "The lname field is required." ], "email": [ "The email field is required." ], "password": [ "The password field is required." ], "password_confirmation": [ "The password confirmation field is required." ] }
what i do is this,if the value contains field is required then console.log it. i saved the json in var data
angular.forEach(data, function(value, key)
{
if( value ==("field is required")){
console.log (key)
}
})
I tried .contains, .match, nothing is working