My problem is this, I have a query like this one:
MATCH (a:A),
(a)-[:relation]-(b:B)
RETURN {name: a.name, products: COLLECT(DISTINCT {productName: b.name,
ident: b.identifier}) }
and I can't find a way to filter the result of 'products', for example, having the rows with the productName = 'pname1' contained in the array 'products':
row1: {name: 'name', products:[{name: 'pname1', ident: 'id1'}, {name: 'pname3', ident: 'id3'}] }
row2: {name: 'name2', products:[{name: 'pname2', ident: 'id2'}] }
The example above would only return the row1
Thank you in advance for your attention