I have a object like this :
this.job_type=
{"":"Select job type","P":"Part-time","C":"Contract","T":"Temporary","O":"Other","V":"Not Applicable"}
and I called it in a controller like this:
$scope.workType=function (type) {
var data=dataShare.job_type
var answer=""
angular.forEach (data, function (value, key)
{
if (type = key)
{
answer=value
}
})
return answer;
console.log (answer)
}
all I want to do is return the value but all i get is a result saying ‘not applicable’ r