{"id":4048,"date":"2023-11-04T23:14:01","date_gmt":"2023-11-04T23:14:01","guid":{"rendered":"http:\/\/localhost:10003\/how-to-implement-crud-operations-with-mongodb-and-node-js\/"},"modified":"2023-11-05T05:48:23","modified_gmt":"2023-11-05T05:48:23","slug":"how-to-implement-crud-operations-with-mongodb-and-node-js","status":"publish","type":"post","link":"http:\/\/localhost:10003\/how-to-implement-crud-operations-with-mongodb-and-node-js\/","title":{"rendered":"How to Implement CRUD Operations with MongoDB and Node.js"},"content":{"rendered":"

In this tutorial, we will learn how to implement CRUD (Create, Read, Update, Delete) operations with MongoDB and Node.js. MongoDB is a NoSQL database that provides high performance, high availability, and easy scalability. Node.js is a popular JavaScript runtime built on Chrome’s V8 JavaScript engine, which allows us to build scalable and efficient server-side applications.<\/p>\n

We will be using the official MongoDB Node.js driver, which provides a high-level API for interacting with MongoDB. You can install the driver using npm, the package manager for Node.js, by running the following command:<\/p>\n

npm install mongodb\n<\/code><\/pre>\n

Let’s get started by creating a new Node.js project and initializing a package.json file. Open your terminal and run the following commands:<\/p>\n

mkdir crud-with-mongodb\ncd crud-with-mongodb\nnpm init -y\n<\/code><\/pre>\n

This will create a new directory called crud-with-mongodb<\/code>, navigate into the directory, and initialize a new package.json<\/code> file with default values.<\/p>\n

Connecting to MongoDB<\/h2>\n

The first step is to establish a connection to the MongoDB server. Create a new file called index.js<\/code> in the crud-with-mongodb<\/code> directory and add the following code:<\/p>\n

const { MongoClient } = require('mongodb');\n\n\/\/ Connection URI for MongoDB server\nconst uri = 'mongodb:\/\/localhost:27017';\n\n\/\/ Database name\nconst dbName = 'myDatabase';\n\n\/\/ Create a new MongoClient\nconst client = new MongoClient(uri);\n\n\/\/ Connect to the MongoDB server\nasync function connect() {\n  try {\n    await client.connect();\n    console.log('Connected to MongoDB server');\n  } catch (error) {\n    console.error('Error connecting to MongoDB server', error);\n  }\n}\n\n\/\/ Close the connection to the MongoDB server\nfunction close() {\n  client.close();\n  console.log('Connection to MongoDB server closed');\n}\n\nconnect();\n<\/code><\/pre>\n

In the above code, we imported the MongoClient<\/code> class from the mongodb<\/code> module, which is the official MongoDB Node.js driver. We also specified the connection URI for the MongoDB server, which is mongodb:\/\/localhost:27017<\/code> in this case. You may need to modify this URI depending on the location and port of your MongoDB server. We also specified the name of the database that we want to connect to.<\/p>\n

We created a new instance of MongoClient<\/code> and called the connect()<\/code> method to establish a connection to the MongoDB server. We used the await<\/code> keyword to wait for the connection operation to complete, as it returns a promise object. If there is an error while connecting, we catch the error and log it to the console.<\/p>\n

To test the connection, open your terminal and run the following command:<\/p>\n

node index.js\n<\/code><\/pre>\n

If the connection is successful, you should see the message “Connected to MongoDB server” in the terminal. If there is an error, make sure that your MongoDB server is running and that the connection URI is correct.<\/p>\n

Creating Documents<\/h2>\n

Now that we have established a connection to the MongoDB server, let’s learn how to create documents in a collection. A collection is a grouping of MongoDB documents, similar to a table in a relational database.<\/p>\n

Create a new function called createDocument()<\/code> in the index.js<\/code> file, as shown below:<\/p>\n

\/\/ Create a document in the collection\nasync function createDocument() {\n  try {\n    const db = client.db(dbName);\n    const collection = db.collection('users');\n\n    \/\/ Document to be inserted into the collection\n    const document = {\n      name: 'John Doe',\n      email: 'johndoe@example.com',\n      age: 25,\n    };\n\n    \/\/ Insert the document into the collection\n    const result = await collection.insertOne(document);\n    console.log('Document created:', result.insertedId);\n  } catch (error) {\n    console.error('Error creating document:', error);\n  }\n}\n\ncreateDocument();\n<\/code><\/pre>\n

In the above code, we accessed the specified database using client.db(dbName)<\/code> and created a new collection called 'users'<\/code> using db.collection('users')<\/code>. We defined a new document with the fields 'name'<\/code>, 'email'<\/code>, and 'age'<\/code>. We then used the insertOne()<\/code> method to insert the document into the collection. Like the connect()<\/code> method, the insertOne()<\/code> method returns a promise object, so we used the await<\/code> keyword to wait for the operation to complete. If there is an error during the creation of the document, we catch the error and log it to the console.<\/p>\n

To test the creation of a document, open your terminal and run the following command:<\/p>\n

node index.js\n<\/code><\/pre>\n

If the document creation is successful, you should see a message similar to “Document created: 61130a75e4b958f358a7ee2e” in the terminal, along with the unique identifier (ObjectId) of the newly created document.<\/p>\n

Reading Documents<\/h2>\n

After creating documents, we often need to retrieve or query them from the database. Let’s learn how to read documents in the 'users'<\/code> collection.<\/p>\n

Create a new function called readDocuments()<\/code> in the index.js<\/code> file, as shown below:<\/p>\n

\/\/ Read documents from the collection\nasync function readDocuments() {\n  try {\n    const db = client.db(dbName);\n    const collection = db.collection('users');\n\n    \/\/ Find all documents in the collection\n    const cursor = collection.find();\n\n    \/\/ Convert the cursor to an array of documents\n    const documents = await cursor.toArray();\n    console.log('Documents read:', documents);\n  } catch (error) {\n    console.error('Error reading documents:', error);\n  }\n}\n\nreadDocuments();\n<\/code><\/pre>\n

In the above code, we accessed the 'users'<\/code> collection using the same method as before. We used the find()<\/code> method to retrieve all documents in the collection. The find()<\/code> method returns a cursor, which allows us to iterate over the documents. We then used the toArray()<\/code> method to convert the cursor to an array of documents. Finally, we logged the retrieved documents to the console.<\/p>\n

To test the reading of documents, open your terminal and run the following command:<\/p>\n

node index.js\n<\/code><\/pre>\n

If the reading of documents is successful, you should see an array of documents similar to the following in the terminal:<\/p>\n

Documents read: [\n  {\n    _id: 61147988aac5b288f42b0e24,\n    name: 'John Doe',\n    email: 'johndoe@example.com',\n    age: 25\n  }\n]\n<\/code><\/pre>\n

Updating Documents<\/h2>\n

Now let’s learn how to update documents in the 'users'<\/code> collection.<\/p>\n

Create a new function called updateDocument()<\/code> in the index.js<\/code> file, as shown below:<\/p>\n

\/\/ Update a document in the collection\nasync function updateDocument() {\n  try {\n    const db = client.db(dbName);\n    const collection = db.collection('users');\n\n    \/\/ Filter for the document to be updated\n    const filter = { name: 'John Doe' };\n\n    \/\/ Update the document\n    const update = { $set: { age: 30 } };\n\n    \/\/ Update the first matching document in the collection\n    const result = await collection.updateOne(filter, update);\n    console.log('Document updated:', result.modifiedCount);\n  } catch (error) {\n    console.error('Error updating document:', error);\n  }\n}\n\nupdateDocument();\n<\/code><\/pre>\n

In the above code, we accessed the 'users'<\/code> collection using the same method as before. We specified a filter to find the document to be updated, in this case, the document with a name value of 'John Doe'<\/code>. We defined an update object using the $set<\/code> operator to update the age field to 30. We used the updateOne()<\/code> method to update the first matching document in the collection. The updateOne()<\/code> method returns a result object, which includes the number of modified documents. Finally, we logged the number of modified documents to the console.<\/p>\n

To test the updating of a document, open your terminal and run the following command:<\/p>\n

node index.js\n<\/code><\/pre>\n

If the updating of a document is successful, you should see a message similar to “Document updated: 1” in the terminal, indicating that one document has been modified.<\/p>\n

Deleting Documents<\/h2>\n

Lastly, let’s learn how to delete documents from the 'users'<\/code> collection.<\/p>\n

Create a new function called deleteDocument()<\/code> in the index.js<\/code> file, as shown below:<\/p>\n

\/\/ Delete a document from the collection\nasync function deleteDocument() {\n  try {\n    const db = client.db(dbName);\n    const collection = db.collection('users');\n\n    \/\/ Filter for the document to be deleted\n    const filter = { name: 'John Doe' };\n\n    \/\/ Delete the document\n    const result = await collection.deleteOne(filter);\n    console.log('Document deleted:', result.deletedCount);\n  } catch (error) {\n    console.error('Error deleting document:', error);\n  }\n}\n\ndeleteDocument();\n<\/code><\/pre>\n

In the above code, we accessed the 'users'<\/code> collection using the same method as before. We specified a filter to find the document to be deleted, in this case, the document with a name value of 'John Doe'<\/code>. We used the deleteOne()<\/code> method to delete the first matching document in the collection. The deleteOne()<\/code> method returns a result object, which includes the number of deleted documents. Finally, we logged the number of deleted documents to the console.<\/p>\n

To test the deletion of a document, open your terminal and run the following command:<\/p>\n

node index.js\n<\/code><\/pre>\n

If the deletion of a document is successful, you should see a message similar to “Document deleted: 1” in the terminal, indicating that one document has been deleted.<\/p>\n

Conclusion<\/h2>\n

In this tutorial, we learned how to implement CRUD operations with MongoDB and Node.js. We covered how to connect to a MongoDB server, create documents in a collection, read documents from a collection, update documents in a collection, and delete documents from a collection. We used the official MongoDB Node.js driver to interact with the MongoDB server and performed these operations asynchronously using async\/await. I encourage you to continue exploring the capabilities of MongoDB and adapting these concepts to your own projects.<\/p>\n","protected":false},"excerpt":{"rendered":"

In this tutorial, we will learn how to implement CRUD (Create, Read, Update, Delete) operations with MongoDB and Node.js. MongoDB is a NoSQL database that provides high performance, high availability, and easy scalability. Node.js is a popular JavaScript runtime built on Chrome’s V8 JavaScript engine, which allows us to build Continue Reading<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","footnotes":""},"categories":[1],"tags":[1059,1057,1056,1058,1054,1055,1053,1052],"yoast_head":"\nHow to Implement CRUD Operations with MongoDB and Node.js - Pantherax Blogs<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/localhost:10003\/how-to-implement-crud-operations-with-mongodb-and-node-js\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Implement CRUD Operations with MongoDB and Node.js\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, we will learn how to implement CRUD (Create, Read, Update, Delete) operations with MongoDB and Node.js. MongoDB is a NoSQL database that provides high performance, high availability, and easy scalability. Node.js is a popular JavaScript runtime built on Chrome’s V8 JavaScript engine, which allows us to build Continue Reading\" \/>\n<meta property=\"og:url\" content=\"http:\/\/localhost:10003\/how-to-implement-crud-operations-with-mongodb-and-node-js\/\" \/>\n<meta property=\"og:site_name\" content=\"Pantherax Blogs\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-04T23:14:01+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-05T05:48:23+00:00\" \/>\n<meta name=\"author\" content=\"Panther\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Panther\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\n\t \"@context\": \"https:\/\/schema.org\",\n\t \"@graph\": [\n\t {\n\t \"@type\": \"Article\",\n\t \"@id\": \"http:\/\/localhost:10003\/how-to-implement-crud-operations-with-mongodb-and-node-js\/#article\",\n\t \"isPartOf\": {\n\t \"@id\": \"http:\/\/localhost:10003\/how-to-implement-crud-operations-with-mongodb-and-node-js\/\"\n\t },\n\t \"author\": {\n\t \"name\": \"Panther\",\n\t \"@id\": \"http:\/\/localhost:10003\/#\/schema\/person\/b63d816f4964b163e53cbbcffaa0f3d7\"\n\t },\n\t \"headline\": \"How to Implement CRUD Operations with MongoDB and Node.js\",\n\t \"datePublished\": \"2023-11-04T23:14:01+00:00\",\n\t \"dateModified\": \"2023-11-05T05:48:23+00:00\",\n\t \"mainEntityOfPage\": {\n\t \"@id\": \"http:\/\/localhost:10003\/how-to-implement-crud-operations-with-mongodb-and-node-js\/\"\n\t },\n\t \"wordCount\": 1034,\n\t \"publisher\": {\n\t \"@id\": \"http:\/\/localhost:10003\/#organization\"\n\t },\n\t \"keywords\": [\n\t \"\\\"Beginner's guide to CRUD Operations with MongoDB and Node.js\\\"]\",\n\t \"\\\"CRUD Operations in Node.js\\\"\",\n\t \"\\\"CRUD Operations with MongoDB\\\"\",\n\t \"\\\"Database Operations with MongoDB and Node.js\\\"\",\n\t \"\\\"Implementing CRUD Operations\\\"\",\n\t \"\\\"MongoDB and Node.js tutorial\\\"\",\n\t \"\\\"Node.js CRUD Operations\\\"\",\n\t \"[\\\"MongoDB CRUD Operations\\\"\"\n\t ],\n\t \"inLanguage\": \"en-US\"\n\t },\n\t {\n\t \"@type\": \"WebPage\",\n\t \"@id\": \"http:\/\/localhost:10003\/how-to-implement-crud-operations-with-mongodb-and-node-js\/\",\n\t \"url\": \"http:\/\/localhost:10003\/how-to-implement-crud-operations-with-mongodb-and-node-js\/\",\n\t \"name\": \"How to Implement CRUD Operations with MongoDB and Node.js - Pantherax Blogs\",\n\t \"isPartOf\": {\n\t \"@id\": \"http:\/\/localhost:10003\/#website\"\n\t },\n\t \"datePublished\": \"2023-11-04T23:14:01+00:00\",\n\t \"dateModified\": \"2023-11-05T05:48:23+00:00\",\n\t \"breadcrumb\": {\n\t \"@id\": \"http:\/\/localhost:10003\/how-to-implement-crud-operations-with-mongodb-and-node-js\/#breadcrumb\"\n\t },\n\t \"inLanguage\": \"en-US\",\n\t \"potentialAction\": [\n\t {\n\t \"@type\": \"ReadAction\",\n\t \"target\": [\n\t \"http:\/\/localhost:10003\/how-to-implement-crud-operations-with-mongodb-and-node-js\/\"\n\t ]\n\t }\n\t ]\n\t },\n\t {\n\t \"@type\": \"BreadcrumbList\",\n\t \"@id\": \"http:\/\/localhost:10003\/how-to-implement-crud-operations-with-mongodb-and-node-js\/#breadcrumb\",\n\t \"itemListElement\": [\n\t {\n\t \"@type\": \"ListItem\",\n\t \"position\": 1,\n\t \"name\": \"Home\",\n\t \"item\": \"http:\/\/localhost:10003\/\"\n\t },\n\t {\n\t \"@type\": \"ListItem\",\n\t \"position\": 2,\n\t \"name\": \"How to Implement CRUD Operations with MongoDB and Node.js\"\n\t }\n\t ]\n\t },\n\t {\n\t \"@type\": \"WebSite\",\n\t \"@id\": \"http:\/\/localhost:10003\/#website\",\n\t \"url\": \"http:\/\/localhost:10003\/\",\n\t \"name\": \"Pantherax Blogs\",\n\t \"description\": \"\",\n\t \"publisher\": {\n\t \"@id\": \"http:\/\/localhost:10003\/#organization\"\n\t },\n\t \"potentialAction\": [\n\t {\n\t \"@type\": \"SearchAction\",\n\t \"target\": {\n\t \"@type\": \"EntryPoint\",\n\t \"urlTemplate\": \"http:\/\/localhost:10003\/?s={search_term_string}\"\n\t },\n\t \"query-input\": \"required name=search_term_string\"\n\t }\n\t ],\n\t \"inLanguage\": \"en-US\"\n\t },\n\t {\n\t \"@type\": \"Organization\",\n\t \"@id\": \"http:\/\/localhost:10003\/#organization\",\n\t \"name\": \"Pantherax Blogs\",\n\t \"url\": \"http:\/\/localhost:10003\/\",\n\t \"logo\": {\n\t \"@type\": \"ImageObject\",\n\t \"inLanguage\": \"en-US\",\n\t \"@id\": \"http:\/\/localhost:10003\/#\/schema\/logo\/image\/\",\n\t \"url\": \"http:\/\/localhost:10003\/wp-content\/uploads\/2023\/11\/cropped-9e7721cb-2d62-4f72-ab7f-7d1d8db89226.jpeg\",\n\t \"contentUrl\": \"http:\/\/localhost:10003\/wp-content\/uploads\/2023\/11\/cropped-9e7721cb-2d62-4f72-ab7f-7d1d8db89226.jpeg\",\n\t \"width\": 1024,\n\t \"height\": 1024,\n\t \"caption\": \"Pantherax Blogs\"\n\t },\n\t \"image\": {\n\t \"@id\": \"http:\/\/localhost:10003\/#\/schema\/logo\/image\/\"\n\t }\n\t },\n\t {\n\t \"@type\": \"Person\",\n\t \"@id\": \"http:\/\/localhost:10003\/#\/schema\/person\/b63d816f4964b163e53cbbcffaa0f3d7\",\n\t \"name\": \"Panther\",\n\t \"image\": {\n\t \"@type\": \"ImageObject\",\n\t \"inLanguage\": \"en-US\",\n\t \"@id\": \"http:\/\/localhost:10003\/#\/schema\/person\/image\/\",\n\t \"url\": \"http:\/\/2.gravatar.com\/avatar\/b8c0eda5a49f8f31ec32d0a0f9d6f838?s=96&d=mm&r=g\",\n\t \"contentUrl\": \"http:\/\/2.gravatar.com\/avatar\/b8c0eda5a49f8f31ec32d0a0f9d6f838?s=96&d=mm&r=g\",\n\t \"caption\": \"Panther\"\n\t },\n\t \"sameAs\": [\n\t \"http:\/\/localhost:10003\"\n\t ],\n\t \"url\": \"http:\/\/localhost:10003\/author\/pepethefrog\/\"\n\t }\n\t ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Implement CRUD Operations with MongoDB and Node.js - Pantherax Blogs","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/localhost:10003\/how-to-implement-crud-operations-with-mongodb-and-node-js\/","og_locale":"en_US","og_type":"article","og_title":"How to Implement CRUD Operations with MongoDB and Node.js","og_description":"In this tutorial, we will learn how to implement CRUD (Create, Read, Update, Delete) operations with MongoDB and Node.js. MongoDB is a NoSQL database that provides high performance, high availability, and easy scalability. Node.js is a popular JavaScript runtime built on Chrome’s V8 JavaScript engine, which allows us to build Continue Reading","og_url":"http:\/\/localhost:10003\/how-to-implement-crud-operations-with-mongodb-and-node-js\/","og_site_name":"Pantherax Blogs","article_published_time":"2023-11-04T23:14:01+00:00","article_modified_time":"2023-11-05T05:48:23+00:00","author":"Panther","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Panther","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/localhost:10003\/how-to-implement-crud-operations-with-mongodb-and-node-js\/#article","isPartOf":{"@id":"http:\/\/localhost:10003\/how-to-implement-crud-operations-with-mongodb-and-node-js\/"},"author":{"name":"Panther","@id":"http:\/\/localhost:10003\/#\/schema\/person\/b63d816f4964b163e53cbbcffaa0f3d7"},"headline":"How to Implement CRUD Operations with MongoDB and Node.js","datePublished":"2023-11-04T23:14:01+00:00","dateModified":"2023-11-05T05:48:23+00:00","mainEntityOfPage":{"@id":"http:\/\/localhost:10003\/how-to-implement-crud-operations-with-mongodb-and-node-js\/"},"wordCount":1034,"publisher":{"@id":"http:\/\/localhost:10003\/#organization"},"keywords":["\"Beginner's guide to CRUD Operations with MongoDB and Node.js\"]","\"CRUD Operations in Node.js\"","\"CRUD Operations with MongoDB\"","\"Database Operations with MongoDB and Node.js\"","\"Implementing CRUD Operations\"","\"MongoDB and Node.js tutorial\"","\"Node.js CRUD Operations\"","[\"MongoDB CRUD Operations\""],"inLanguage":"en-US"},{"@type":"WebPage","@id":"http:\/\/localhost:10003\/how-to-implement-crud-operations-with-mongodb-and-node-js\/","url":"http:\/\/localhost:10003\/how-to-implement-crud-operations-with-mongodb-and-node-js\/","name":"How to Implement CRUD Operations with MongoDB and Node.js - Pantherax Blogs","isPartOf":{"@id":"http:\/\/localhost:10003\/#website"},"datePublished":"2023-11-04T23:14:01+00:00","dateModified":"2023-11-05T05:48:23+00:00","breadcrumb":{"@id":"http:\/\/localhost:10003\/how-to-implement-crud-operations-with-mongodb-and-node-js\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/localhost:10003\/how-to-implement-crud-operations-with-mongodb-and-node-js\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/localhost:10003\/how-to-implement-crud-operations-with-mongodb-and-node-js\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/localhost:10003\/"},{"@type":"ListItem","position":2,"name":"How to Implement CRUD Operations with MongoDB and Node.js"}]},{"@type":"WebSite","@id":"http:\/\/localhost:10003\/#website","url":"http:\/\/localhost:10003\/","name":"Pantherax Blogs","description":"","publisher":{"@id":"http:\/\/localhost:10003\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/localhost:10003\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"http:\/\/localhost:10003\/#organization","name":"Pantherax Blogs","url":"http:\/\/localhost:10003\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/localhost:10003\/#\/schema\/logo\/image\/","url":"http:\/\/localhost:10003\/wp-content\/uploads\/2023\/11\/cropped-9e7721cb-2d62-4f72-ab7f-7d1d8db89226.jpeg","contentUrl":"http:\/\/localhost:10003\/wp-content\/uploads\/2023\/11\/cropped-9e7721cb-2d62-4f72-ab7f-7d1d8db89226.jpeg","width":1024,"height":1024,"caption":"Pantherax Blogs"},"image":{"@id":"http:\/\/localhost:10003\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"http:\/\/localhost:10003\/#\/schema\/person\/b63d816f4964b163e53cbbcffaa0f3d7","name":"Panther","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/localhost:10003\/#\/schema\/person\/image\/","url":"http:\/\/2.gravatar.com\/avatar\/b8c0eda5a49f8f31ec32d0a0f9d6f838?s=96&d=mm&r=g","contentUrl":"http:\/\/2.gravatar.com\/avatar\/b8c0eda5a49f8f31ec32d0a0f9d6f838?s=96&d=mm&r=g","caption":"Panther"},"sameAs":["http:\/\/localhost:10003"],"url":"http:\/\/localhost:10003\/author\/pepethefrog\/"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/posts\/4048"}],"collection":[{"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/comments?post=4048"}],"version-history":[{"count":1,"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/posts\/4048\/revisions"}],"predecessor-version":[{"id":4504,"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/posts\/4048\/revisions\/4504"}],"wp:attachment":[{"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/media?parent=4048"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/categories?post=4048"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/tags?post=4048"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}