In this case, the ID is blog_post
, so you can retrieve its records pluralizing and camel-casing the Model ID, and using the result as a method on the dato
object:
// dato.config.jsmodule.exports = (dato, root, i18n) => {// iterate over the Array of records of the `blog_post` modeldato.blogPosts.forEach(record => {// ...});};
If you need to access the record associated to a single-instance model, you don't need to pluralize the Model ID:
// dato.config.jsmodule.exports = (dato, root, i18n) => {// returns the record for the `about_page` single-instance model// (or null, if it hasn't been created yet)dato.aboutPage;};