It seems nice. However is there any way to query arrays within the datastructure itself? Or go deeper in the hierarchy, such as "model.cost"?
It seems nice. However is there any way to query arrays within the datastructure itself? Or go deeper in the hierarchy, such as "model.cost"?
I thought about doing exactly what you suggested, where a query could access deeper properties with a syntax like "model.cost", but ultimately decided against it because I didn't like the complexity that would necessitate.
As for arrays, I usually opt for joining the string and then doing an "includes" query. e.g. ["sm", "md", "lg"] -> "sm,md,lg" and then you could write a query like "size *= md". Obviously this approach has its disadvantages though.
I'm definitely open to rethinking both of these if that's a common enough want/need.