I am trying to query a document. Before I return the document, I need to delete some attributes like _id
, _rev
and add a few other calculated attributes. How can I achieve this?
Asked
Active
Viewed 559 times
1 Answers
4
To remove some attributes you can use the UNSET
functions:
FOR item in collection
RETURN UNSET(item, "_id", "_key", "_rev")
Regarding calculating new attributes it mostly depends on what you want to achieve but there are a lot of available functions in AQL. If you give us a bit more details we could find what works for you!
Sources:
- UNSET function https://www.arangodb.com/docs/stable/aql/functions-document.html#unset
- Documentation about AQL functions: https://www.arangodb.com/docs/stable/aql/functions.html

darkheir
- 8,844
- 6
- 45
- 66