Reputation: 37
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?
Upvotes: 2
Views: 815
Reputation: 8950
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:
Upvotes: 4