In referencing how to do this i took a look at how-to-get-all-properties-values-of-a-javascript-object-without-knowing-the-key Using ES6
How would you do this if the object you are scanning into has child object where you need only the Values for those too, into an array.
example :
var errorData = {"Message":"The request is invalid.","ModelState":{"account.Contact.PrimaryPhone":["Primary Phone is required.","'Primary Phone' should not be empty."]}}
var errors = Object.keys(errorData).map(function (key) {
return errorData[key];
});
doesn't work.
i need an array that lists like this:
The request is invalid.
Primary Phone is required.
'Primary Phone' should not be empty.