I have a database of products in an arangodb collection in which a product has multiple sizes. The issue is that for each size, the same product is repeated. But each product has a common group number. Like this:
{"name": "product1", "description": "someDescription", size: 5, groupNumber: 12}
{"name": "product1", "description": "someDescription", size: 15, groupNumber: 12}
{"name": "product1", "description": "someDescription", size: 25, groupNumber: 12}
{"name": "product1", "description": "someDescription", size: 35, groupNumber: 12}
{"name": "product2", "description": "someDescription", size: 5, groupNumber: 11}
{"name": "product2", "description": "someDescription", size: 15, groupNumber: 11}
{"name": "product2", "description": "someDescription", size: 25, groupNumber: 11}
{"name": "product2", "description": "someDescription", size: 35, groupNumber: 11}
I have to now display the list of products(in a web page) but each product should appear only once with sizes in an array for each product like this:
product1 someDescription sizes: 5,15,25,35
product2 someDescription sizes: 5,15,25,35
...
Each page should contain upto 25 products. I wonder how to do this using arangodb and is it at all possible?