Dealing with a JSON object that has incorrect data, my aim is to replace the existing value with one from a lookup table. However, I am unsure of how to swap out the data with values from the lookup table.
lookupTable = {
"pizza": function() {
console.log("food");
},
"house": function() {
console.log("building");
},
"air": function() {
console.log("nothing");
}
};
$scope.value = lookupTable["pizza"]()
The HTML file contains:
<tr ng-repeat="x in names">
<td>{{ x.lookupTable["pizza"]() }}</td>
You can find my code at http://plnkr.co/edit/w4lOFVRo9vSi8vqfbpXV?p=preview
Would greatly appreciate any assistance!