FOR doc IN array_of_documents
INSERT doc INTO colleciton_name
let users_info = [
{"id": 2, "firstName" : "Sowmya", "lastName" : "Gurram"},
{"id" : 3, "firstName" : "Madhu", "lastName" : "Thatha"}
]
for doc in users_info
INSERT doc INTO users
You can execute below snippet to get all the documents from a collection.
Syntax
FOR item in collection RETURN item
FOR userDoc IN users
RETURN userDoc
No comments:
Post a Comment