Skip to content
Advertisement

How to make an array of objects from object array in vueJs?

I have an Object array which is following enter image description here

But, I need to show

  • email: Email muss eine …..
  • phone: Telefonnummer ist …

How can I do this in javascript? Actually I need to use this in VueJs.

Advertisement

Answer

From the screenshot you are receiving this from props so we can do this in the template:

JavaScript

If you would like to get all the errors into a single array (e.g. ['Email mus...', 'Telefon ...']) you can do:

JavaScript
Advertisement