Coming from neo4j and new to Arango.
I am trying to query my data and build a corresponding data structure.
So I have something like:
Circle A
/ \
Square A Circle B
/ \ \
Circle C Square B Square D
Circle are stored in a document collection. Square are stored in a document collection.
I then have two edge Collections HAS_CIRCLE and HAS_SQUARE which correspond appropriately.
I know I want Circle B and its neightbors - in a structure like so.
{
circle: {data from Circle B},
parents: [{data from Circle A}],
children: [{data from Circle C}],
squares: [{data from Square B}, {data from Square D}]
}
*Also to note I am not looking to nest this structure. Like when I want {data from Circle A} in parents
- I don't expect this to also have parents, children, squares - just literally looking for the metadata contained in that node.
I know I can start like this... but I quickly get lost. And even when doing the basics - I can't seem to collect it up properly and associate the array to a key.
FOR c in Circle
FILTER c.name === 'Circle B'
FOR hc in HAS_CIRCLE
FILTER hc._from === c._id