{"id":11853,"date":"2014-02-19T21:42:28","date_gmt":"2014-02-19T16:12:28","guid":{"rendered":"https:\/\/tothenewco.pro\/blog\/?p=11853"},"modified":"2016-12-19T15:31:07","modified_gmt":"2016-12-19T10:01:07","slug":"validation-with-mongoose","status":"publish","type":"post","link":"https:\/\/tothenewco.pro\/blog\/validation-with-mongoose\/","title":{"rendered":"Validation with Mongoose"},"content":{"rendered":"<p>In one of our <strong>Node.js<\/strong> projects, we used <strong>Mongoose<\/strong> module to interact with <strong>MongoDB<\/strong>. <strong>Mongoose<\/strong> provides us four types of built-in validation on <strong>schema<\/strong> as below:<\/p>\n<p><strong>1. Required<\/strong>: We can mark a field as <strong>required<\/strong>, which must be provided.<br \/>\n<strong>2. Limit<\/strong>: If field is type of <strong>Number<\/strong> in <strong>Schema<\/strong>, then we can restrict <strong>maximum<\/strong> and <strong>minimum<\/strong> value for that field.<br \/>\n<strong>3. ENUM<\/strong>: If field is type of <strong>String<\/strong> in <strong>Schema<\/strong>, then we can provide the list of <strong>Strings<\/strong> which should <strong>match<\/strong> with the value in that field.<br \/>\n<strong>4. Match<\/strong>: If field is type of <strong>String<\/strong> in <strong>Schema<\/strong>, then we can provide <strong>regex<\/strong> to <strong>match<\/strong> that value.<\/p>\n<p>Let\u2019s go through each one of them with examples:<\/p>\n<p>[js]<br \/>\n\/*<br \/>\n* requiring mongoose module.<br \/>\n* *\/<br \/>\nvar mongoose = require (&#8216;mongoose&#8217;);<\/p>\n<p>\/\/ Defining ENUMs for the gender field which will use for validation.<br \/>\nvar genders = &#8216;MALE FEMALE&#8217;.split(&#8216; &#8216;)<\/p>\n<p>\/\/ Connecting with mongodb(validation db).<br \/>\nmongoose.connect(&#8216;mongodb:\/\/localhost\/validation&#8217;);<\/p>\n<p>\/*<br \/>\n* Defining User Schema with name(as Required Field), age(with Minimum and Maximum values),<br \/>\n* gender (which is ENUM, so it can be MALE or FEMALE only) and last one is email (which<br \/>\n* will match the provided regex.)<br \/>\n* *\/<br \/>\nvar UserSchema = mongoose.Schema({<br \/>\n    name: {type: String, required: true}, \/\/ 1. Required validation<br \/>\n    age: {type: Number, min: 16, max: 60}, \/\/ 2. Minimum and Maximum value validation<br \/>\n    gender: {type: String, enum: genders}, \/\/ 3. ENUM validation<br \/>\n    email: {type: String, match: \/\\S+@\\S+\\.\\S+\/} \/\/ 4. Match validation via regex<br \/>\n});<\/p>\n<p>var User = mongoose.model(&#8216;User&#8217;, UserSchema);<\/p>\n<p>\/*<br \/>\n* When we call save function on the model, then first it calls validate function to validate<br \/>\n* the values. Validate method takes callback as argument, if any error occurs at the time<br \/>\n* of validating values then validate function calls callback with errors otherwise calls<br \/>\n* with null.<br \/>\n* *\/<br \/>\nnew User({age: 25}).validate(function (error) {<br \/>\n    console.log(&quot;ERROR: &quot;, error); \/\/ Error for Name Field because its marked as Required.<br \/>\n});<br \/>\nnew User({name: &quot;Amit Thakkar&quot;, age:15}).validate(function (error) {<br \/>\n    console.log(&quot;ERROR: &quot;, error); \/\/ Error for Age Field, age is less than Minimum value.<br \/>\n});<br \/>\nnew User({name: &quot;Amit Thakkar&quot;, age:61}).validate(function (error) {<br \/>\n    console.log(&quot;ERROR: &quot;, error); \/\/ Error for Age Field, age is more than Maximum value.<br \/>\n});<br \/>\nnew User({name: &quot;Amit Thakkar&quot;, age:25, gender:&quot;male&quot;}).validate(function (error) {<br \/>\n    console.log(&quot;ERROR: &quot;, error); \/\/ Error for Gender Field, male does not match with ENUM.<br \/>\n});<br \/>\nnew User({name: &quot;Amit Thakkar&quot;, age:25, gender:&quot;MALE&quot;, email:&quot;amit.kumar@intelligrape&quot;}).validate(function (error) {<br \/>\n    console.log(&quot;ERROR: &quot;, error); \/\/ Error for Invalid Email id.<br \/>\n});<br \/>\nnew User({name: &quot;Amit Thakkar&quot;, age:25, gender:&quot;MALE&quot;, email:&quot;amit.kumar@intelligrape.com&quot;}).validate(function (error) {<br \/>\n    console.log(&quot;ERROR: &quot;, error); \/\/ Error will be undefined<br \/>\n});<br \/>\n[\/js]<\/p>\n<p>Amit Kumar<br \/>\n<a href=\"https:\/\/tothenewco.pro\/blog\/author\/amit.kumar\/\">amit.kumar@intelligrape.com<\/a><br \/>\nin.linkedin.com\/in\/amitkumar0110<br \/>\ntwitter.com\/amit_kumar0110<br \/>\n<strong><a href=\"https:\/\/tothenewco.pro\/blog\/author\/amit-kumar\/\">More Blogs by Me<\/a><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In one of our Node.js projects, we used Mongoose module to interact with MongoDB. Mongoose provides us four types of built-in validation on schema as below: 1. Required: We can mark a field as required, which must be provided. 2. Limit: If field is type of Number in Schema, then we can restrict maximum and [&hellip;]<\/p>\n","protected":false},"author":52,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":18,"footnotes":""},"categories":[1185],"tags":[1317,1318,4846,1316,1124,1177,901],"class_list":["post-11853","post","type-post","status-publish","format-standard","hentry","category-node-js-2","tag-build-in","tag-in-build","tag-mongodb","tag-mongoose","tag-node-js","tag-nodejs-2","tag-validation"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"In one of our Node.js projects, we used Mongoose module to interact with MongoDB. Mongoose provides us four types of built-in validation on schema as below: 1. Required: We can mark a field as required, which must be provided. 2. Limit: If field is type of Number in Schema, then we can restrict maximum and\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Amit Kumar\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/tothenewco.pro\/blog\/validation-with-mongoose\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"Validation with Mongoose | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"In one of our Node.js projects, we used Mongoose module to interact with MongoDB. Mongoose provides us four types of built-in validation on schema as below: 1. Required: We can mark a field as required, which must be provided. 2. Limit: If field is type of Number in Schema, then we can restrict maximum and\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/tothenewco.pro\/blog\/validation-with-mongoose\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Validation with Mongoose | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"In one of our Node.js projects, we used Mongoose module to interact with MongoDB. Mongoose provides us four types of built-in validation on schema as below: 1. Required: We can mark a field as required, which must be provided. 2. Limit: If field is type of Number in Schema, then we can restrict maximum and\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/validation-with-mongoose\\\/#article\",\"name\":\"Validation with Mongoose | TO THE NEW Blog\",\"headline\":\"Validation with Mongoose\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/amit-kumar\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2014-02-19T21:42:28+05:30\",\"dateModified\":\"2016-12-19T15:31:07+05:30\",\"inLanguage\":\"en-US\",\"commentCount\":2,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/validation-with-mongoose\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/validation-with-mongoose\\\/#webpage\"},\"articleSection\":\"Node.js, build-in, in-build, MongoDB, Mongoose, node.js, nodejs, validation\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/validation-with-mongoose\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/node-js-2\\\/#listItem\",\"name\":\"Node.js\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/node-js-2\\\/#listItem\",\"position\":2,\"name\":\"Node.js\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/node-js-2\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/validation-with-mongoose\\\/#listItem\",\"name\":\"Validation with Mongoose\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/validation-with-mongoose\\\/#listItem\",\"position\":3,\"name\":\"Validation with Mongoose\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/node-js-2\\\/#listItem\",\"name\":\"Node.js\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/amit-kumar\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/amit-kumar\\\/\",\"name\":\"Amit Kumar\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/validation-with-mongoose\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/859356966acd3c3879759369c7ac72cfb81228287bfc78e99c3080bee9b6b9ba?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Amit Kumar\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/validation-with-mongoose\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/validation-with-mongoose\\\/\",\"name\":\"Validation with Mongoose | TO THE NEW Blog\",\"description\":\"In one of our Node.js projects, we used Mongoose module to interact with MongoDB. Mongoose provides us four types of built-in validation on schema as below: 1. Required: We can mark a field as required, which must be provided. 2. Limit: If field is type of Number in Schema, then we can restrict maximum and\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/validation-with-mongoose\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/amit-kumar\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/amit-kumar\\\/#author\"},\"datePublished\":\"2014-02-19T21:42:28+05:30\",\"dateModified\":\"2016-12-19T15:31:07+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Validation with Mongoose | TO THE NEW Blog","description":"In one of our Node.js projects, we used Mongoose module to interact with MongoDB. Mongoose provides us four types of built-in validation on schema as below: 1. Required: We can mark a field as required, which must be provided. 2. Limit: If field is type of Number in Schema, then we can restrict maximum and","canonical_url":"https:\/\/tothenewco.pro\/blog\/validation-with-mongoose\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/tothenewco.pro\/blog\/validation-with-mongoose\/#article","name":"Validation with Mongoose | TO THE NEW Blog","headline":"Validation with Mongoose","author":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/amit-kumar\/#author"},"publisher":{"@id":"https:\/\/tothenewco.pro\/blog\/#organization"},"datePublished":"2014-02-19T21:42:28+05:30","dateModified":"2016-12-19T15:31:07+05:30","inLanguage":"en-US","commentCount":2,"mainEntityOfPage":{"@id":"https:\/\/tothenewco.pro\/blog\/validation-with-mongoose\/#webpage"},"isPartOf":{"@id":"https:\/\/tothenewco.pro\/blog\/validation-with-mongoose\/#webpage"},"articleSection":"Node.js, build-in, in-build, MongoDB, Mongoose, node.js, nodejs, validation"},{"@type":"BreadcrumbList","@id":"https:\/\/tothenewco.pro\/blog\/validation-with-mongoose\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog#listItem","position":1,"name":"Home","item":"https:\/\/tothenewco.pro\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/node-js-2\/#listItem","name":"Node.js"}},{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/node-js-2\/#listItem","position":2,"name":"Node.js","item":"https:\/\/tothenewco.pro\/blog\/category\/node-js-2\/","nextItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/validation-with-mongoose\/#listItem","name":"Validation with Mongoose"},"previousItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/validation-with-mongoose\/#listItem","position":3,"name":"Validation with Mongoose","previousItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/node-js-2\/#listItem","name":"Node.js"}}]},{"@type":"Organization","@id":"https:\/\/tothenewco.pro\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/tothenewco.pro\/blog\/"},{"@type":"Person","@id":"https:\/\/tothenewco.pro\/blog\/author\/amit-kumar\/#author","url":"https:\/\/tothenewco.pro\/blog\/author\/amit-kumar\/","name":"Amit Kumar","image":{"@type":"ImageObject","@id":"https:\/\/tothenewco.pro\/blog\/validation-with-mongoose\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/859356966acd3c3879759369c7ac72cfb81228287bfc78e99c3080bee9b6b9ba?s=96&d=mm&r=g","width":96,"height":96,"caption":"Amit Kumar"}},{"@type":"WebPage","@id":"https:\/\/tothenewco.pro\/blog\/validation-with-mongoose\/#webpage","url":"https:\/\/tothenewco.pro\/blog\/validation-with-mongoose\/","name":"Validation with Mongoose | TO THE NEW Blog","description":"In one of our Node.js projects, we used Mongoose module to interact with MongoDB. Mongoose provides us four types of built-in validation on schema as below: 1. Required: We can mark a field as required, which must be provided. 2. Limit: If field is type of Number in Schema, then we can restrict maximum and","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/tothenewco.pro\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/tothenewco.pro\/blog\/validation-with-mongoose\/#breadcrumblist"},"author":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/amit-kumar\/#author"},"creator":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/amit-kumar\/#author"},"datePublished":"2014-02-19T21:42:28+05:30","dateModified":"2016-12-19T15:31:07+05:30"},{"@type":"WebSite","@id":"https:\/\/tothenewco.pro\/blog\/#website","url":"https:\/\/tothenewco.pro\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/tothenewco.pro\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Validation with Mongoose | TO THE NEW Blog","og:description":"In one of our Node.js projects, we used Mongoose module to interact with MongoDB. Mongoose provides us four types of built-in validation on schema as below: 1. Required: We can mark a field as required, which must be provided. 2. Limit: If field is type of Number in Schema, then we can restrict maximum and","og:url":"https:\/\/tothenewco.pro\/blog\/validation-with-mongoose\/","og:image":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Validation with Mongoose | TO THE NEW Blog","twitter:description":"In one of our Node.js projects, we used Mongoose module to interact with MongoDB. Mongoose provides us four types of built-in validation on schema as below: 1. Required: We can mark a field as required, which must be provided. 2. Limit: If field is type of Number in Schema, then we can restrict maximum and","twitter:image":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"11853","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-29 15:26:56","updated":"2024-02-29 09:26:53","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/tothenewco.pro\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/tothenewco.pro\/blog\/category\/node-js-2\/\" title=\"Node.js\">Node.js<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tValidation with Mongoose\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/tothenewco.pro\/blog"},{"label":"Node.js","link":"https:\/\/tothenewco.pro\/blog\/category\/node-js-2\/"},{"label":"Validation with Mongoose","link":"https:\/\/tothenewco.pro\/blog\/validation-with-mongoose\/"}],"_links":{"self":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts\/11853","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/users\/52"}],"replies":[{"embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/comments?post=11853"}],"version-history":[{"count":0,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts\/11853\/revisions"}],"wp:attachment":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/media?parent=11853"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/categories?post=11853"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/tags?post=11853"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}