Skip to content
Advertisement

Vue filter array A by array B

I have a table with data from a rest API. The table has objects with unique ids and I have a group filter with unique group ids. The group id does not appear in the table, therefore I have to create an array which only contains the ids of the table objects. Every time the group changes the array will be updated.

My goal is to show only the table objects which are in the array I have created before.

During research I found this interesting example, but I can’t get it to work.

HTML:

JavaScript

Vue:

JavaScript

Advertisement

Answer

I got the solution:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement