A FieldPath refers to a field in a document. The path may consist of a
single field name (referring to a top-level field in the document), or a
list of field names (referring to a nested field in the document).
Create a FieldPath by providing field names. If more than one field
name is provided, the path will point to a nested field in a document.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2022-07-27 UTC."],[],[],null,["# FieldPath | JavaScript SDK\n\n- [firebase](/docs/reference/node/firebase).\n- [firestore](/docs/reference/node/firebase.firestore).\n- FieldPath\n================================================================================================================\n\nA FieldPath refers to a field in a document. The path may consist of a\nsingle field name (referring to a top-level field in the document), or a\nlist of field names (referring to a nested field in the document).\n\nCreate a FieldPath by providing field names. If more than one field\nname is provided, the path will point to a nested field in a document.\n\nIndex\n-----\n\n### Constructors\n\n- [constructor](/docs/reference/node/firebase.firestore.FieldPath#constructor)\n\n### Methods\n\n- [isEqual](/docs/reference/node/firebase.firestore.FieldPath#isequal)\n- [documentId](/docs/reference/node/firebase.firestore.FieldPath#documentid)\n\nConstructors\n------------\n\n### constructor\n\n- new FieldPath ( ... fieldNames : string \\[\\] ) : [FieldPath](/docs/reference/node/firebase.firestore.FieldPath)\n- Creates a FieldPath from the provided field names. If more than one field\n name is provided, the path will point to a nested field in a document.\n\n #### Parameters\n\n -\n\n ##### Rest ...fieldNames: string\\[\\]\n\n A list of field names.\n\n #### Returns [FieldPath](/docs/reference/node/firebase.firestore.FieldPath)\n\nMethods\n-------\n\n### isEqual\n\n- isEqual ( other : [FieldPath](/docs/reference/node/firebase.firestore.FieldPath) ) : boolean\n- Returns true if this `FieldPath` is equal to the provided one.\n\n #### Parameters\n\n -\n\n ##### other: [FieldPath](/docs/reference/node/firebase.firestore.FieldPath)\n\n The `FieldPath` to compare against.\n\n #### Returns boolean\n\n true if this `FieldPath` is equal to the provided one.\n\n### Static documentId\n\n- documentId ( ) : [FieldPath](/docs/reference/node/firebase.firestore.FieldPath)\n- Returns a special sentinel `FieldPath` to refer to the ID of a document.\n It can be used in queries to sort or filter by the document ID.\n\n #### Returns [FieldPath](/docs/reference/node/firebase.firestore.FieldPath)"]]
A FieldPath refers to a field in a document. The path may consist of a single field name (referring to a top-level field in the document), or a list of field names (referring to a nested field in the document).
Create a FieldPath by providing field names. If more than one field name is provided, the path will point to a nested field in a document.