This is a very simple question, but I am writing a web page that should display user information. The fields name, id, role, etc. will appear. I want to write the setter and getter methods for JSON that I get from the database. For example, if I get JSON and I want to get and display the name field, how would I write this getter method in angularJS after receiving JSON from the $ resource service?
This is an example of what JSON looks like:
[{"name": "Jason"
"date of birth": "february 23, 2985"
....
}]
Again, I just want to know how to write a getter method if I want to get a name field.
source
share