My Laravel API is generating the following error response:
https://i.sstatic.net/vVPQE.png
I have defined this response as a scope named errors and used ng-repeat to display them:
<ul class="list errors-list" ng-show="errors">
<li ng-repeat="error in errors" class="item">{{error}}</li>
</div>
Unfortunately, the output looks like this:
["The title field is required."]
Is there an efficient way to extract only the text without the quotes or brackets?
I am aware that I can manually remove them, but I prefer knowing if there is a best practice for handling this situation.