Hi, you can try the following:
LET sub = ( FOR what IN ['SW', 'SY', 'SX'] RETURN what ) RETURN ZIP(1..LENGTH(sub), sub) and replace the "sub" subquery with the actual query, which in your case would be LET sub = ( FOR O in Objects SORT O.p ASC RETURN O.name ) RETURN ZIP(1..LENGTH(sub), sub) Best regards Jan Am Dienstag, 30. Mai 2017 18:25:47 UTC+2 schrieb Arangogo: > > > In AQL how can we parse the result from a RETURN sorting query ? > > *Our actual collections have many thousands of items : we will limit the > resulting array to a short list* > > For example with only three Objects SX, SY, SW in our collection, with > property variable p : > > > > *FOR O IN ObjectsSORT O.p ASCRETURN O.name* > > may return this array : > > > > > > *[ "SW", "SY", "SX"]* > > > Now we want to parse and list the resulting array with visible indexes 1, > 2, 3 > > What is the ID of the array in the database ? > > How can we process this returned array *directly* ? > > > > > > > > > > > -- You received this message because you are subscribed to the Google Groups "ArangoDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
