Inserting a document

Chris Biscardi
InstructorChris Biscardi
Share this video with your friends

Social Share Links

Send Tweet
Published 5 years ago
Updated 4 years ago

How to create a document in a collection using the FaunaDB shell. Note that when sending the document in, you have to make it a value of the data key.

Create(
  Collection("customers"),
  {
    data: {
      firstName: "Jane",
      lastName: "Doe",
      address: {
        street: "87856 Mendota Court",
        city: "Idaho Falls",
        state: "ID",
        zipCode: "83405"
      },
      telephone: "208-346-0715",
      creditCard: {
        network: "Visa",
        number: "4556781272473393"
      }
    }
  }
)