This is a very simple question but I'm writing a webpage that's supposed to display the user's information. There will be fields of name, id, role, etc. I want to write setter and getter methods for the JSON that I receive from the database. For example, if I get a JSON and I want to get and display the name field, how would I write this getter method in angularJS after getting the JSON from a $resource service?
This is an example of how the JSON would look:
[{"name": "Jason"
"date of birth": "february 23, 2985"
....
}]
Again, I just want to know how to write a getter method if I wanted to get the name field.