{"id":102499,"date":"2024-06-24T18:36:13","date_gmt":"2024-06-24T18:36:13","guid":{"rendered":"https:\/\/www.red-gate.com\/simple-talk\/?p=102499"},"modified":"2024-11-14T22:25:43","modified_gmt":"2024-11-14T22:25:43","slug":"deleting-documents-from-a-mongodb-collection","status":"publish","type":"post","link":"https:\/\/www.red-gate.com\/simple-talk\/databases\/nosql\/mongodb\/deleting-documents-from-a-mongodb-collection\/","title":{"rendered":"Deleting Documents from a MongoDB Collection"},"content":{"rendered":"<p><strong>This article is part of Robert Sheldon's continuing series on Mongo DB. To see all of the items in the series, <a href=\"https:\/\/www.red-gate.com\/simple-talk\/collections\/robert-sheldon-ongoing-mongodb-primer\/\">click here<\/a>.<\/strong><\/p>\n\n<p>So far in this series, we\u2019ve looked at different ways that you can add, retrieve, and update documents in a MongoDB collection. This article continues that discussion by explaining how to use MongoDB Shell to delete documents from a collection. Once you know how to delete documents, you\u2019ll have the foundation you\u2019ll need to perform the basic create, read, update, and delete (CRUD) operations in MongoDB, assuming you\u2019ve been following along in this series. From this foundation, you can start moving on to more advance CRUD operations.<\/p>\n<p>As with other aspects of MongoDB, the platform supports multiple ways to delete documents. In this article, I focus on how to use the <code>deleteOne<\/code> and <code>deleteMany<\/code> methods, which are available to the collection object, similar to what you saw with the <code>updateOne<\/code> and <code>updateMany<\/code> methods. As their names suggest, the <code>deleteOne<\/code> method can delete only one document at a time, while the <code>deleteMany<\/code> method can delete any number of documents in a collection.<\/p>\n<p>The examples in this article are specific to MongoDB Shell, rather than applying to a programming language such as PHP or Python. The syntax tends to vary from one environment to the next, so you have to treat them individually, although the basic concepts are the same.<\/p>\n<p>The <code>deleteOne<\/code> and <code>deleteMany<\/code> methods are fairly straightforward. Most of the work is in the filter, which is defined as one of the method\u2019s arguments. The filter determines which documents in the collection to delete. As you work through this article, you\u2019ll get a better sense of how the filter works and how to create filters to meet your needs.<\/p>\n<p>Note: For the examples in this article, I used the same MongoDB Atlas and MongoDB Compass environments I used for the previous articles in this series. Refer to the first article for more specifics about setting up these environments. The examples in this article use the <code>hr<\/code> database and <code>candidates<\/code> collection in that database to demonstrate various way to delete data. As we work through the article, I\u2019ll explain how to set those up and add documents to them.<\/p>\n<h2>Deleting documents in a MongoDB collection<\/h2>\n<p>The <code>deleteOne<\/code> and <code>deleteMany<\/code> methods are two of the most common techniques used to delete documents from a MongoDB collection. You can use either method in MongoDB Shell by creating a statement that references the collection object and then calls the method. The statement syntax is essentially the same for either method, except for the method name. For example, the following syntax shows the elements that make up a <code>deleteOne<\/code> statement:<\/p>\n<pre class=\"lang:none theme:none \">db.collection.deleteOne( { filter }, { options } );<\/pre>\n<p>As the syntax indicates, the statement consists of the following components:<\/p>\n<ul>\n<li><strong>db.<\/strong> System variable for referencing the current database and accessing the properties and methods available to the database object.<\/li>\n<li><strong><em>collection<\/em>.<\/strong> Placeholder for the target collection. For this article, we will be using the <code>candidates<\/code> collection.<\/li>\n<li><strong>deleteOne.<\/strong> A method available to the collection object for deleting a single document in the specified collection.<\/li>\n<li><strong><em>filter<\/em>.<\/strong> Placeholder for the selection criteria that determine which document to delete. This is similar to the filter used in a <code>find<\/code> statement. If <code><em>filter<\/em><\/code> returns more than one document, MongoDB deletes only to the first document returned from the collection. An empty document (<code>{}<\/code>) means that <code><em>filter<\/em><\/code> returns all documents in the collection, although MongoDB still deletes only to the first returned document.<\/li>\n<li><strong><em>options<\/em>.<\/strong> Placeholder for one or more optional settings that can be included in an <code>deleteOne<\/code> statement to better refine the query.<\/li>\n<\/ul>\n<p>A statement that is based on an <code>deleteMany<\/code> method works much the same way as the <code>deleteOne<\/code> method. The only variation in the basic syntax is the method name:<\/p>\n<pre class=\"lang:none theme:none\">db.<em>collection<\/em>.deleteMany( { <em>filter<\/em> }, { <em>options<\/em> } );<\/pre>\n<p>The main difference between the <code>deleteOne<\/code> and <code>deleteMany<\/code> methods, other than their names, is the <code><em>filter<\/em><\/code> element. With the <code>deleteOne<\/code> method, only the first document returned from the collection is deleted, no matter how many documents that <code><em>filter<\/em><\/code> returns. With the <code>deleteMany<\/code> method, all documents that <code><em>filter<\/em><\/code> returns are deleted. With that in mind, let\u2019s take a look at some examples.<\/p>\n<h2>Deleting a single document<\/h2>\n<p>For the examples in this article, we\u2019ll be using the version of MongoDB Shell that\u2019s embedded in the MongoDB Compass GUI. In this way, we can view our results in the main Compass interface as we delete data in MongoDB Shell, making it easier to visually verify our deletions. We\u2019ll also be using the <code>hr<\/code> database, which might already exist on your system if you tried out the examples in the previous article in this series.<\/p>\n<p>When working in MongoDB Shell, you have to switch the database context to the database you want to target. For this, you need to issue a <code>use<\/code> command, as you\u2019ve seen in previous articles:<\/p>\n<pre class=\"lang:none theme:none\">use hr;<\/pre>\n<p>You can use this command whether or not the database already exists. In this case, the command switches the database context to <code>hr<\/code>. If the database doesn\u2019t exist, MongoDB automatically creates it. However, the database will not show up in the Compass GUI until you\u2019ve added your first collection.<\/p>\n<p>After you switch the database context, you can use the <code>createCollection<\/code> method to add a collection to the active database. To create the <code>candidates<\/code> collection, you should run the following <code>createCollection<\/code> statement:<\/p>\n<pre class=\"lang:none theme:none\">db.createCollection(\"candidates\");<\/pre>\n<p>Once you\u2019ve created the collection, you can use the <code>insertMany<\/code> method to add documents to that collection. For the first set of examples in this article, you should run the following <code>insertMany<\/code> statement in MongoDB Shell:<\/p>\n<pre class=\"lang:none theme:none\">db.candidates.insertMany([\n  { \"_id\": 101, \"name\": \"Drew\", \"position\": \"Senior Developer\", \"dept\": \"R&amp;D\" },\n  { \"_id\": 102, \"name\": \"Parker\", \"position\": \"Data Scientist\", \"dept\": \"R&amp;D\" },\n  { \"_id\": 103, \"name\": \"Harper\", \"position\": \"Marketing Manager\", \"dept\": \"Marketing\" },\n  { \"_id\": 104, \"name\": \"Darcy\", \"position\": \"Senior Developer\", \"dept\": \"R&amp;D\" },\n  { \"_id\": 105, \"name\": \"Carey\", \"position\": \"SEO specialist\", \"dept\": \"Marketing\" },\n  { \"_id\": 106, \"name\": \"Avery\", \"position\": \"Network Admin\", \"dept\": \"IT\" }\n]);<\/pre>\n<p>The <code>insertMany<\/code> statement adds six simple documents to the collection. After you\u2019ve run the statement, open the <code>candidates<\/code> collection in the <strong>Documents<\/strong> tab of the main window. The tab should display the documents you just created, as shown in the following figure.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1570\" height=\"1650\" class=\"wp-image-102500\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2024\/05\/word-image-102499-1.png\" \/><\/p>\n<p>Now that we\u2019ve added the documents, let\u2019s look at how we go about deleting them, starting with the <code>deleteOne<\/code> method. In its simplest form, the method requires no arguments other than an empty document, as in the following example:<\/p>\n<pre class=\"lang:none theme:none\">db.candidates.deleteOne({});<\/pre>\n<p>As I pointed out earlier, the <code>deleteOne<\/code> method deletes only one document no matter how many are returned by the filter. In this case, no filter is defined, so all documents in the collection are returned, although only the first one is deleted. When you run the statement, MongoDB Shell returns the following message, which confirms that a single document has been removed:<\/p>\n<pre class=\"lang:none theme:none\">{\n  acknowledged: true,\n  deletedCount: 1\n}<\/pre>\n<p>Next, go to the <strong>Documents<\/strong> tab of the main Compass window and click the refresh button in the tab\u2019s upper right corner. The tab should now display only five documents, rather than the original six. The first document in the collection had an <code>_id<\/code> value of <code>101<\/code>, but that document has been removed, as shown in the following figure.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1560\" height=\"1138\" class=\"wp-image-102501\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2024\/05\/word-image-102499-2.png\" \/><\/p>\n<p>In most cases, you\u2019ll define a filter when using the <code>deleteOne<\/code> method, rather than passing in an empty document. For example, if you want to specifically delete the document with an <code>_id<\/code> value of <code>102<\/code>, you can use the following statement:<\/p>\n<pre class=\"lang:none theme:none\">db.candidates.deleteOne({ \"_id\": 102 });<\/pre>\n<p>The <code>deleteOne<\/code> method now includes a filter, which specifies the name of the field, <code>_id<\/code>, followed by the target value, <code>102<\/code>. A colon separates the field name from the value. When you run the statement, MongoDB returns only this document, which is then deleted. The statement also returns the same message as the previous example, confirming that only one document was deleted.<\/p>\n<p>Because the filter specifically states which document to delete, MongoDB will remove only that one, if it exists. If it does not exist, MongoDB returns a message indicating that no documents have been removed.<\/p>\n<h2>Deleting multiple documents<\/h2>\n<p>If you want to delete more than one document at a time, you should use the <code>deleteMany<\/code> method, rather than <code>deleteOne<\/code>. The two methods work the same, in terms of how they filter documents, so once you understand how to use one, you should have no problem using the other. For example, the following statement uses the <code>deleteMany<\/code> method to remove all documents whose <code>dept<\/code> field value is <code>Marketing<\/code>:<\/p>\n<pre class=\"lang:none theme:none\">db.candidates.deleteMany({ \"dept\": \"Marketing\" });<\/pre>\n<p>As in the previous example, the filter specifies a field name (in this case, <code>dept<\/code>), followed by the target value (<code>Marketing<\/code>). Only two documents match this search criteria, one with an <code>_id<\/code> value of <code>103<\/code> and the other with an <code>_id<\/code> value of <code>105<\/code>. These are the two documents that are deleted.<\/p>\n<p>As with the <code>deleteOne<\/code> method, you do not have to define a filter when using the <code>deleteMany<\/code> method. You can simply pass in an empty document, as in the following example:<\/p>\n<pre class=\"lang:none theme:none\">db.candidates.deleteMany({});<\/pre>\n<p>Although this is a quick and easy way to delete all the documents in a collection, you must be extremely cautious when taking this approach so you don\u2019t inadvertently wipe out an entire collection in a single blow.<\/p>\n<h2>Deleting documents based on embedded fields<\/h2>\n<p>A collection\u2019s documents often contain embedded documents. In some cases, you might want to delete documents based on one of the embedded values. The type of deletion works much the same as any other type of deletions, except that you need to reference the embedded field in a specific way.<\/p>\n<p>Before I demonstrate how this works, make sure there are no documents left in the <code>candidates<\/code> collection. If you followed along with the examples in the previous section, the collection should now be empty. However, if any of the original documents still remain, you should first run the following <code>deleteMany<\/code> statement:<\/p>\n<pre class=\"lang:none theme:none\">db.candidates.deleteMany({});<\/pre>\n<p>Once the collection is empty, you can run the following <code>insertMany<\/code> statement to add the next set of sample data, which we\u2019ll use for the remaining examples in this article:<\/p>\n<pre class=\"lang:none theme:none\">db.candidates.insertMany([\n  { \"_id\": 101, \n    \"name\": \"Drew\", \n    \"position\": { \n      \"title\": \"Senior Developer\", \n      \"dept\": \"R&amp;D\",\n      \"skills\": [ \"Java\", \"SQL\", \"Python\", \"PHP\" ],\n      \"yrs_exp\": 18 } },\n  { \"_id\": 102, \n    \"name\": \"Parker\", \n    \"position\": { \n      \"title\": \"Data Scientist\", \n      \"dept\": \"R&amp;D\",\n      \"yrs_exp\": 14 } },\n  { \"_id\": 103, \n    \"name\": \"Harper\", \n    \"position\": { \n      \"title\": \"Marketing Manager\", \n      \"dept\": \"Marketing\",\n      \"yrs_exp\": 22 } },\n  { \"_id\": 104, \n    \"name\": \"Darcy\", \n    \"position\": { \n      \"title\": \"Senior Developer\", \n      \"dept\": \"R&amp;D\",\n      \"skills\": [ \"Java\", \"Csharp\", \"Python\", \"R\" ],\n      \"yrs_exp\": 6 } },\n  { \"_id\": 105, \n    \"name\": \"Carey\", \n    \"position\": { \n      \"title\": \"SEO Specialist\", \n      \"dept\": \"Marketing\",\n      \"yrs_exp\": 7 } },\n  { \"_id\": 106, \n    \"name\": \"Avery\", \n    \"position\": { \n      \"title\": \"Network Admin\", \n      \"dept\": \"IT\",\n      \"yrs_exp\": 11 } },\n  { \"_id\": 107, \n    \"name\": \"Avery\", \n    \"position\": { \n      \"title\": \"Developer\", \n      \"dept\": \"R&amp;D\",\n      \"skills\": [ \"Haskell\", \"Fortran\", \"Smalltalk\", \"COBOL\" ],\n      \"yrs_exp\": 8 } }\n]);<\/pre>\n<p>The <code>insertMany<\/code> statement adds seven documents. Each one contains the <code>position<\/code> field, whose value is an embedded document. After you add the documents, you can view them on the <strong>Documents<\/strong> tab of the main Compass window, as you did before. Don\u2019t forget to click the refresh button. The following figure shows the first four new documents, with the <code>position<\/code> field expanded in the first document.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1544\" height=\"1064\" class=\"wp-image-102502\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2024\/05\/word-image-102499-3.png\" \/><\/p>\n<p>Notice that the embedded document includes the <code>dept<\/code> field. Suppose you want to delete the documents in the collection that have a <code>dept<\/code> value of <code>Marketing<\/code>. As you saw in previous articles in this series, you can reference the fields in an embedded document by qualifying the field name with the parent field. In this case, you would reference the <code>dept<\/code> field by first specifying the <code>position<\/code> field, followed by a period, and then by <code>dept<\/code>, as in <code>position.dept<\/code>.<\/p>\n<p>Before I demonstrate how to delete documents based on an embedded field, I first want to point out that you can use the <code>find<\/code> method to verify what documents will be deleted before you actually delete them. The filter in the <code>find<\/code> method works just like the <code>deleteOne<\/code> or <code>deleteMany<\/code> filter, so it provides a handy way of verifying your actions before carrying them out. For example, the following <code>find<\/code> statement returns all documents with a <code>position.dept<\/code> value of <code>Marketing<\/code>:<\/p>\n<pre class=\"lang:none theme:none\">db.candidates.find({ \"position.dept\": \"Marketing\" });<\/pre>\n<p>The statement returns two documents, one with an <code>_id<\/code> value of <code>103<\/code> and the other with an <code>_id<\/code> value of <code>105<\/code>. The following figure shows the results as they appear in MongoDB Shell.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1180\" height=\"1100\" class=\"wp-image-102503\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2024\/05\/word-image-102499-4.png\" \/><\/p>\n<p>Once you\u2019ve verified which documents will be deleted, you can then use the same filter in your <code>deleteMany<\/code> statement, as in the following example:<\/p>\n<pre class=\"lang:none theme:none\">db.candidates.deleteMany({ \"position.dept\": \"Marketing\" });<\/pre>\n<p>Not surprisingly, the statement deletes the same two documents. Using a <code>find<\/code> statement in this way is optional, of course, but you might find it useful at times, especially when you\u2019re dealing with complex documents or statement filters.<\/p>\n<h2>Deleting documents based on multiple search criteria<\/h2>\n<p>Up to this point, the filters in the example statements included only one search condition. However, you might find it necessary to specify multiple conditions in your filter. To do so, you include all the conditions within the same set of curly brackets and then use a comma to separate them. For example, the following <code>deleteOne<\/code> statement includes two search conditions in its filter:<\/p>\n<pre class=\"lang:none theme:none\">db.candidates.deleteOne({ \"name\": \"Avery\", \"position.dept\": \"IT\" });<\/pre>\n<p>The first search condition specifies that the <code>name<\/code> field must contain the value <code>Avery<\/code>, and the second search condition specifies that the <code>position.dept<\/code> field much contain the value <code>IT<\/code>. For a document to be deleted, it must meet both search conditions. Only one document in the collection meets these two conditions: the one with an <code>_id<\/code> value of <code>106<\/code>.<\/p>\n<p>You can also use comparison operators when defining your method\u2019s filters. For instance, the following <code>deleteMany<\/code> statement uses the <code>$lt<\/code> (less than) comparison operator:<\/p>\n<pre class=\"lang:none theme:none\">db.candidates.deleteMany({ \n  \"position.title\": \"Senior Developer\", \"position.yrs_exp\": { $lt: 10 }\n});<\/pre>\n<p>The statement\u2019s first search condition specifies that the <code>position.title<\/code> value must be <code>Senior<\/code> <code>Developer<\/code>. The statement\u2019s second search condition specifies that the <code>position.yrs_exp<\/code> value must be less than <code>10<\/code>. As in the previous example, both conditions must be met for a document to be deleted. In this case, only the document with an <code>_id<\/code> value of <code>104<\/code> satisfies both conditions.<\/p>\n<p>You might have noticed that in some documents the <code>position<\/code> field includes the <code>skills<\/code> subfield, which is an array of string values. When deleting documents, you can specify array values as part of your method\u2019s filter, as in the following example:<\/p>\n<pre class=\"lang:none theme:none\">db.candidates.deleteMany({ \n  \"position.dept\": \"R&amp;D\", \"position.skills\": { $all: [ \"Haskell\", \"Fortran\" ] }\n});<\/pre>\n<p>The statement\u2019s filter includes two search conditions. The first specifies that the <code>position.dept<\/code> value should be <code>R&amp;D<\/code>, and the second specifies that the <code>position.skills<\/code> array should contain the values <code>Haskell<\/code> and <code>Fortran<\/code>. The <code>$all<\/code> operator tells MongoDB that the array must include both values. It can also contain other values, but it must contain <code>Haskell<\/code> and <code>Fortran<\/code> for the document to be returned (and subsequently deleted). In this case, only one document meets both criteria, the one with an <code>_id<\/code> value of <code>107<\/code>.<\/p>\n<h2>Specifying an option when deleting documents<\/h2>\n<p>The <code>deleteOne<\/code> and <code>deleteMany<\/code> methods also support several options that you can include when deleting documents from a collection. Although a discussion of each option is beyond the scope of this article, I want to at least demonstrate how to specify an option in case the need arises.<\/p>\n<p>One of the options is <code>collation<\/code>, which lets you define language-specific rules for string comparisons. For example, the following <code>deleteOne<\/code> statement uses the <code>collation<\/code> option to specify the <code>locale<\/code> setting, which is associated with a specific language, and the <code>strength<\/code> setting, which determines the level of comparison to perform:<\/p>\n<pre class=\"lang:none theme:none\">db.candidates.deleteOne(\n  { \"name\": \"Drew\", \"position.dept\": \"R&amp;D\" },\n  { collation: { locale: \"en\", strength: 1 } }\n);<\/pre>\n<p>In this case, the value assigned to <code>locale<\/code> is <code>en<\/code>, the setting used for basic English. The value assigned to <code>strength<\/code> is <code>1<\/code>. This means that string comparisons are carried out only on the base characters and are not concerned with differences such as diacritics and case.<\/p>\n<p>When specifying options in a <code>deleteOne<\/code> or <code>deleteMany<\/code> statement, you must enclose them in a second set of curly brackets. The options come after the filter, with a comma separating the two. If you specify more than one option, you must separate them with a comma as well.<\/p>\n<p>The filter in this example specifies that the <code>name<\/code> value must be <code>Drew<\/code> and the <code>position.dept<\/code> value must be <code>R&amp;D<\/code>. The only document to meet these search conditions is the one with an <code>_id<\/code> value of <code>101<\/code>.<\/p>\n<h2>Getting started with deleting documents in MongoDB<\/h2>\n<p>The <code>deleteOne<\/code> and <code>deleteMany<\/code> methods help to complete the picture on how to perform CRUD operations in a MongoDB database, at least in terms of carrying out those operations in MongoDB Shell. In the next article, I\u2019ll explain how to use the Compass GUI to perform many of these operations, and later in the series, we\u2019ll look at how to perform them in a programming language such as Python. In the meantime, you might want to read the MongoDB documentation on the <a href=\"https:\/\/www.mongodb.com\/docs\/manual\/reference\/method\/db.collection.deleteOne\/\">deleteOne<\/a> and <a href=\"https:\/\/www.mongodb.com\/docs\/manual\/reference\/method\/db.collection.deleteMany\/\">deleteMany<\/a> methods to get a more complete picture of how they work.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So far in this series, we\u2019ve looked at different ways that you can add, retrieve, and update documents in a MongoDB collection. This article continues that discussion by explaining how to use MongoDB Shell to delete documents from a collection. Once you know how to delete documents, you\u2019ll have the foundation you\u2019ll need to perform&#8230;&hellip;<\/p>\n","protected":false},"author":221841,"featured_media":104585,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[53,159161],"tags":[5618,159226],"coauthors":[6779],"class_list":["post-102499","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-featured","category-mongodb","tag-mongodb","tag-mongodbseriesrobertsheldon"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/102499","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/users\/221841"}],"replies":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/comments?post=102499"}],"version-history":[{"count":4,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/102499\/revisions"}],"predecessor-version":[{"id":104586,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/102499\/revisions\/104586"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media\/104585"}],"wp:attachment":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media?parent=102499"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/categories?post=102499"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/tags?post=102499"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/coauthors?post=102499"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}