Creating Many to many relationship with association table

This is the point where it becomes worthwhile to skim/search the docs and tutorials for things like Storing Data in Data Tables.

It would not be worthwhile for me to repeat all that! And you’re sure to find examples, with answers to other, related questions you might have.

If you’re going to go over Table 3, and cover all of its linked rows, then you might want to consider order_by, to group the results by source (or target) row.

I would further suggest doing as much work (collection and ordering of results) as possible in a Server function. That function will have faster access to your tables than anything on the Client. It can get more work done in less time.

To your Client code, your Server function would have the effect of a more complex search, no matter how you decided to write the Server function.