On an Angular 7 application I have the following:
var name_key = "name";
var language_key = "language";
var type_key = "type"
Then an API returns the following JSON:
{
"errors": {
"language": [
"language not found"
],
"name": [
"name not found",
"name must not exceed 200 characters"
]
}
}
I need to get the error messages for each key so that would be:
"name" > "name not found",
"name must not exceed 200 characters"
"language" > "language not found"
"type" > NULL
How can I do this?