Created
April 21, 2021 15:46
-
-
Save mcat95/f6dba9774a4c8e02edf169e1f2c12149 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mongoose = require('mongoose'); | |
const schema = mongoose.Schema({ | |
field1: [mongoose.Schema({ | |
field2: mongoose.Schema({ | |
field3: Boolean, | |
}), | |
})], | |
}); | |
console.log(schema.path('field1.field2.field3')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment