I am trying to write an axios asynchronous Get that is intended to return only those elements in a “Parents” collection that have a given value occurring in a “Children” array constituent of the parent. What I mean is that these parent elements include a property “children” that is an array of objects; each object has an ID and Name value of an element in a different Children collection. The view I am trying to write has been passed the Name of a child element, and the async axios Get is to get only those parent elements that have that child’s name in some object inside the parent element’s “children” array. The parent and child relationships are many:many.
Can one build a “filter” on the Get which will do this? Is that even possible?
Clearly the equals operator won’t suffice.
If I must I can fetch ALL the parents and then prune the results, but that would be wasteful, if course.
Thanks for any guidance!