Node.js - collection.doc()
Get a reference to a document in the collection.
import { collection } from '@nitric/sdk'const profiles = collection('profiles').for('reading', 'writing')const drakesProfile = profiles.doc('Drake Mallard')
Parameters
- Name
 key- Required
 - Required
 - Type
 - string
 - Description
 The key of the document to reference.
See also
Have feedback on this page?
Open GitHub IssueLast updated on Oct 7, 2025