{"id":4712,"date":"2023-09-07T21:40:51","date_gmt":"2023-09-08T04:40:51","guid":{"rendered":"https:\/\/ioflood.com\/blog\/?p=4712"},"modified":"2024-01-30T08:03:29","modified_gmt":"2024-01-30T15:03:29","slug":"python-dictionary-methods","status":"publish","type":"post","link":"https:\/\/ioflood.com\/blog\/python-dictionary-methods\/","title":{"rendered":"Python Dictionary Methods: A Complete Usage Guide"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure class=\"alignright size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/ioflood.com\/blog\/wp-content\/uploads\/2023\/09\/Various-dictionary-methods-in-Python-key-value-pairs-method-symbols-code-300x300.jpg\" alt=\"Various dictionary methods in Python key-value pairs method symbols code\" width=\"300\" height=\"300\" title=\"\"><\/figure>\n<\/div>\n<p>Are you finding it challenging to work with Python dictionary methods? You&#8217;re not alone. Many developers find themselves puzzled when it comes to understanding and using these methods effectively. But, think of Python&#8217;s dictionary methods as a Swiss army knife &#8211; versatile and handy for various tasks.<\/p>\n<p>Whether you&#8217;re manipulating data, creating dynamic mappings, or even debugging, understanding how to use Python dictionary methods can significantly streamline your coding process.<\/p>\n<p><strong>In this guide, we&#8217;ll walk you through the process of using Python dictionary methods, from the basics to more advanced techniques.<\/strong> We&#8217;ll cover everything from the <code>get()<\/code>, <code>keys()<\/code>, <code>values()<\/code>, <code>items()<\/code>, <code>update()<\/code>, to <code>pop()<\/code> methods, as well as alternative approaches.<\/p>\n<p>Let&#8217;s get started!<\/p>\n<h2>TL;DR: What Are the Main Methods for Python Dictionaries?<\/h2>\n<blockquote><p>\n  Python dictionaries have several methods such as <code>get()<\/code>, <code>keys()<\/code>, <code>values()<\/code>, <code>items()<\/code>, <code>update()<\/code>, and <code>pop()<\/code>. These methods allow you to access, modify, and manipulate data in your dictionaries in various ways.\n<\/p><\/blockquote>\n<p>Here&#8217;s a simple example of using some of these methods:<\/p>\n<pre><code class=\"language-python line-numbers\">my_dict = {'name': 'John', 'age': 30}\nprint(my_dict.keys())\nprint(my_dict.values())\nprint(my_dict.get('name'))\n\n# Output:\n# dict_keys(['name', 'age'])\n# dict_values(['John', 30])\n# 'John'\n<\/code><\/pre>\n<p>In this example, we create a dictionary <code>my_dict<\/code> with keys &#8216;name&#8217; and &#8216;age&#8217;. We then use the <code>keys()<\/code> method to get a list of all keys, the <code>values()<\/code> method to get a list of all values, and the <code>get()<\/code> method to access the value of a specific key.<\/p>\n<blockquote><p>\n  This is just a basic introduction to Python dictionary methods. There&#8217;s much more to learn about these methods, including more advanced techniques and alternative approaches. Continue reading for a more comprehensive guide.\n<\/p><\/blockquote>\n<h2>Discovering Basic Python Dictionary Methods<\/h2>\n<p>Python dictionaries come with a set of built-in methods that make it easier to work with them. Let&#8217;s start with the basic ones: <code>get()<\/code>, <code>keys()<\/code>, <code>values()<\/code>, and <code>items()<\/code>.<\/p>\n<h3>The <code>get()<\/code> Method<\/h3>\n<p>The <code>get()<\/code> method allows you to retrieve the value of a specific key from the dictionary. It&#8217;s a safer way to access a key-value pair because it will not result in an error if the key does not exist.<\/p>\n<p>Here&#8217;s how you can use it:<\/p>\n<pre><code class=\"language-python line-numbers\">my_dict = {'name': 'John', 'age': 30}\nprint(my_dict.get('name'))\nprint(my_dict.get('address', 'Not Found'))\n\n# Output:\n# 'John'\n# 'Not Found'\n<\/code><\/pre>\n<p>In this example, the <code>get()<\/code> method returns &#8216;John&#8217; when we try to access the key &#8216;name&#8217;. When we try to access &#8216;address&#8217;, which does not exist in the dictionary, it returns &#8216;Not Found&#8217; instead of throwing an error.<\/p>\n<h3>The <code>keys()<\/code> and <code>values()<\/code> Methods<\/h3>\n<p>The <code>keys()<\/code> and <code>values()<\/code> methods return a list of all the keys and values in the dictionary, respectively.<\/p>\n<p>Let&#8217;s see them in action:<\/p>\n<pre><code class=\"language-python line-numbers\">my_dict = {'name': 'John', 'age': 30}\nprint(my_dict.keys())\nprint(my_dict.values())\n\n# Output:\n# dict_keys(['name', 'age'])\n# dict_values(['John', 30])\n<\/code><\/pre>\n<p>In this code, <code>keys()<\/code> returns a list of all keys in <code>my_dict<\/code>, and <code>values()<\/code> returns a list of all values.<\/p>\n<h3>The <code>items()<\/code> Method<\/h3>\n<p>The <code>items()<\/code> method is used to return a list of all key-value pairs in the dictionary.<\/p>\n<p>Here&#8217;s an example:<\/p>\n<pre><code class=\"language-python line-numbers\">my_dict = {'name': 'John', 'age': 30}\nprint(my_dict.items())\n\n# Output:\n# dict_items([('name', 'John'), ('age', 30)])\n<\/code><\/pre>\n<p>In this example, <code>items()<\/code> returns a list of tuples, where each tuple contains a key-value pair from the dictionary.<\/p>\n<p>These basic methods are the building blocks for working with Python dictionaries. Mastering them will help you manipulate and access data in your dictionaries more efficiently.<\/p>\n<h2>Exploring Advanced Python Dictionary Methods<\/h2>\n<p>Once you&#8217;re comfortable with the basic Python dictionary methods, it&#8217;s time to move on to some of the more advanced techniques. We&#8217;ll focus on <code>update()<\/code>, <code>pop()<\/code>, <code>setdefault()<\/code>, and <code>popitem()<\/code> methods.<\/p>\n<h3>The <code>update()<\/code> Method<\/h3>\n<p>The <code>update()<\/code> method allows you to add new key-value pairs to a dictionary or modify existing ones.<\/p>\n<p>Here&#8217;s an example:<\/p>\n<pre><code class=\"language-python line-numbers\">my_dict = {'name': 'John', 'age': 30}\nmy_dict.update({'age': 31, 'address': '123 Street'})\nprint(my_dict)\n\n# Output:\n# {'name': 'John', 'age': 31, 'address': '123 Street'}\n<\/code><\/pre>\n<p>In this example, we use <code>update()<\/code> to change the value of &#8216;age&#8217; and add a new key-value pair &#8216;address&#8217;.<\/p>\n<h3>The <code>pop()<\/code> Method<\/h3>\n<p>The <code>pop()<\/code> method is used to remove a key-value pair from a dictionary. It requires the key of the pair you want to remove as an argument and returns the value of the removed pair.<\/p>\n<p>Here&#8217;s how it works:<\/p>\n<pre><code class=\"language-python line-numbers\">my_dict = {'name': 'John', 'age': 30, 'address': '123 Street'}\nremoved_value = my_dict.pop('address')\nprint(removed_value)\nprint(my_dict)\n\n# Output:\n# '123 Street'\n# {'name': 'John', 'age': 30}\n<\/code><\/pre>\n<p>In this example, <code>pop()<\/code> removes the &#8216;address&#8217; key-value pair from the dictionary and returns the value &#8216;123 Street&#8217;.<\/p>\n<h3>The <code>setdefault()<\/code> Method<\/h3>\n<p>The <code>setdefault()<\/code> method is a safer way to add new key-value pairs to a dictionary. It only adds the pair if the key does not already exist in the dictionary.<\/p>\n<p>Here&#8217;s an example:<\/p>\n<pre><code class=\"language-python line-numbers\">my_dict = {'name': 'John', 'age': 30}\nmy_dict.setdefault('address', '123 Street')\nprint(my_dict)\n\n# Output:\n# {'name': 'John', 'age': 30, 'address': '123 Street'}\n<\/code><\/pre>\n<p>In this example, <code>setdefault()<\/code> adds the &#8216;address&#8217; key-value pair to the dictionary because &#8216;address&#8217; does not exist in <code>my_dict<\/code>.<\/p>\n<h3>The <code>popitem()<\/code> Method<\/h3>\n<p>The <code>popitem()<\/code> method removes and returns the last key-value pair added to the dictionary.<\/p>\n<p>Here&#8217;s how you can use it:<\/p>\n<pre><code class=\"language-python line-numbers\">my_dict = {'name': 'John', 'age': 30, 'address': '123 Street'}\nremoved_pair = my_dict.popitem()\nprint(removed_pair)\nprint(my_dict)\n\n# Output:\n# ('address', '123 Street')\n# {'name': 'John', 'age': 30}\n<\/code><\/pre>\n<p>In this example, <code>popitem()<\/code> removes the last added key-value pair (&#8216;address&#8217;, &#8216;123 Street&#8217;) and returns it.<\/p>\n<p>These advanced methods provide more control over how you can manipulate Python dictionaries. Understanding how to use them effectively can significantly improve your coding efficiency.<\/p>\n<h2>Alternative Techniques for Python Dictionary Manipulation<\/h2>\n<p>Python offers a variety of alternative techniques for manipulating dictionaries. These include comprehensions, the <code>dict()<\/code> constructor, and using third-party libraries. Understanding these methods can provide you with more tools to tackle complex problems.<\/p>\n<h3>Dictionary Comprehensions<\/h3>\n<p>Dictionary comprehensions provide a concise way to create dictionaries. They are similar to list comprehensions, but with key-value pairs instead of single values.<\/p>\n<p>Here&#8217;s an example:<\/p>\n<pre><code class=\"language-python line-numbers\">squares = {x: x**2 for x in range(6)}\nprint(squares)\n\n# Output:\n# {0: 0, 1: 1, 2: 4, 3: 9, 4: 16, 5: 25}\n<\/code><\/pre>\n<p>In this example, we use a dictionary comprehension to create a dictionary where the keys are numbers from 0 to 5 and the values are their corresponding squares.<\/p>\n<h3>The <code>dict()<\/code> Constructor<\/h3>\n<p>The <code>dict()<\/code> constructor allows you to create dictionaries in a different way. It can be useful when you need to create a dictionary from sequences of elements.<\/p>\n<p>Here&#8217;s how you can use it:<\/p>\n<pre><code class=\"language-python line-numbers\">my_dict = dict(name='John', age=30)\nprint(my_dict)\n\n# Output:\n# {'name': 'John', 'age': 30}\n<\/code><\/pre>\n<p>In this example, we use the <code>dict()<\/code> constructor to create a dictionary with &#8216;name&#8217; and &#8216;age&#8217; as keys.<\/p>\n<h3>Third-Party Libraries<\/h3>\n<p>Python&#8217;s vast ecosystem includes several third-party libraries that provide additional methods to work with dictionaries. Libraries like <code>pandas<\/code> and <code>numpy<\/code> can be particularly useful when working with large datasets.<\/p>\n<p>Here&#8217;s an example of using <code>pandas<\/code> to create a DataFrame from a dictionary:<\/p>\n<pre><code class=\"language-python line-numbers\">import pandas as pd\n\nmy_dict = {'name': ['John', 'Jane'], 'age': [30, 25]}\ndf = pd.DataFrame(my_dict)\nprint(df)\n\n# Output:\n#    name  age\n# 0  John   30\n# 1  Jane   25\n<\/code><\/pre>\n<p>In this example, we use the <code>pandas<\/code> library to create a DataFrame from a dictionary. This allows us to manipulate and analyze the data in a tabular format.<\/p>\n<p>These alternative approaches provide additional flexibility when working with dictionaries. Depending on your specific use case, one method may be more suitable than others. It&#8217;s worthwhile to experiment with these techniques to find the one that works best for you.<\/p>\n<h2>Troubleshooting Python Dictionary Methods<\/h2>\n<p>As with any coding process, you may encounter some issues when working with Python dictionary methods. Let&#8217;s discuss some of the common problems and their solutions.<\/p>\n<h3>Understanding KeyError<\/h3>\n<p>A KeyError is a common issue that occurs when you try to access a key that does not exist in the dictionary. Here&#8217;s an example:<\/p>\n<pre><code class=\"language-python line-numbers\">my_dict = {'name': 'John', 'age': 30}\nprint(my_dict['address'])\n\n# Output:\n# KeyError: 'address'\n<\/code><\/pre>\n<p>In this example, we try to access the &#8216;address&#8217; key, which does not exist in the dictionary, resulting in a KeyError. To avoid this, you can use the <code>get()<\/code> method, which returns None or a default value if the key does not exist.<\/p>\n<h3>Dealing with TypeError<\/h3>\n<p>A TypeError can occur if you try to use an unhashable object as a dictionary key. In Python, only immutable objects (like strings, numbers, or tuples) can be used as dictionary keys.<\/p>\n<p>Here&#8217;s an example of a TypeError:<\/p>\n<pre><code class=\"language-python line-numbers\">my_dict = {['name']: 'John'}\n\n# Output:\n# TypeError: unhashable type: 'list'\n<\/code><\/pre>\n<p>In this example, we try to use a list as a dictionary key, which results in a TypeError. To avoid this, make sure to use only immutable objects as dictionary keys.<\/p>\n<h3>Other Considerations<\/h3>\n<p>While working with Python dictionary methods, it&#8217;s also essential to consider the size of the dictionary and the efficiency of different methods. For example, if you&#8217;re working with a large dictionary, using the <code>keys()<\/code> or <code>values()<\/code> methods can consume a lot of memory as they return a new list of keys or values. In such cases, using the <code>iterkeys()<\/code> or <code>itervalues()<\/code> methods can be more efficient as they return an iterator.<\/p>\n<p>Understanding these common issues and their solutions can help you work with Python dictionary methods more effectively. Remember, the key to mastering Python dictionaries is practice and experimentation.<\/p>\n<h2>Unpacking the Python Dictionary<\/h2>\n<p>Before we delve deeper into Python dictionary methods, let&#8217;s take a step back and understand what Python dictionaries are and why they are useful.<\/p>\n<h3>Understanding Python Dictionaries<\/h3>\n<p>A Python dictionary is a built-in data type that stores data in key-value pairs. It&#8217;s an example of a data structure known as a hash table. Unlike other data types like lists or tuples, which store a single value at each index, dictionaries allow us to store a value against a unique key. This makes dictionaries incredibly useful for tasks where you need to associate values with unique identifiers.<\/p>\n<p>Here&#8217;s an example of a Python dictionary:<\/p>\n<pre><code class=\"language-python line-numbers\">my_dict = {'name': 'John', 'age': 30}\nprint(my_dict)\n\n# Output:\n# {'name': 'John', 'age': 30}\n<\/code><\/pre>\n<p>In this example, &#8216;name&#8217; and &#8216;age&#8217; are keys, and &#8216;John&#8217; and 30 are their corresponding values.<\/p>\n<h3>The Role of Hash Tables<\/h3>\n<p>Under the hood, Python dictionaries use a concept known as hashing to store and retrieve data. When you insert a key-value pair into a dictionary, Python uses a hash function to convert the key into a hash code, which is then used as the index to store the corresponding value. This allows Python dictionaries to retrieve values for a given key in constant time, regardless of the size of the dictionary.<\/p>\n<h3>Keys and Values<\/h3>\n<p>The keys in a Python dictionary are unique and immutable, meaning each key can appear only once and cannot be changed after it&#8217;s created. On the other hand, values can be of any type and can be modified. You can use the <code>keys()<\/code> method to get a list of all keys and the <code>values()<\/code> method to get a list of all values in the dictionary.<\/p>\n<pre><code class=\"language-python line-numbers\">my_dict = {'name': 'John', 'age': 30}\nprint(my_dict.keys())\nprint(my_dict.values())\n\n# Output:\n# dict_keys(['name', 'age'])\n# dict_values(['John', 30])\n<\/code><\/pre>\n<p>In this example, <code>keys()<\/code> returns a list of all keys in the dictionary, and <code>values()<\/code> returns a list of all values.<\/p>\n<p>Understanding these fundamentals of Python dictionaries is crucial to grasp the various dictionary methods and their uses effectively.<\/p>\n<h2>The Impact of Python Dictionary Methods on Different Applications<\/h2>\n<p>Python dictionary methods are not just limited to solving specific coding problems. They also play a crucial role in various applications such as data analysis, web development, and more.<\/p>\n<h3>Python Dictionary Methods in Data Analysis<\/h3>\n<p>In data analysis, Python dictionaries are often used to store and manipulate data. The <code>get()<\/code>, <code>keys()<\/code>, <code>values()<\/code>, and <code>items()<\/code> methods are particularly useful for accessing and analyzing data. For example, you can use the <code>get()<\/code> method to retrieve specific data points for analysis, or the <code>keys()<\/code> and <code>values()<\/code> methods to perform operations on all data points.<\/p>\n<h3>Python Dictionary Methods in Web Development<\/h3>\n<p>In web development, Python dictionaries are commonly used to handle data sent and received in web requests. For instance, when you send a POST request to a web server, the data is typically sent as a dictionary. The <code>update()<\/code>, <code>pop()<\/code>, and <code>setdefault()<\/code> methods can be used to manipulate this data as needed.<\/p>\n<h3>Exploring Related Concepts<\/h3>\n<p>While Python dictionary methods are powerful, they are just one part of the larger Python ecosystem. To become a proficient Python developer, it&#8217;s important to explore related concepts like sets, lists, and tuples. These data structures have their own set of methods and use-cases, and understanding them can help you write more efficient and effective code.<\/p>\n<h3>Further Resources for Mastering Python Dictionary Methods<\/h3>\n<p>To continue your journey towards mastering Python dictionary methods, here are some resources that provide in-depth tutorials and exercises:<\/p>\n<ol>\n<li><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/ioflood.com\/blog\/python-dictionary-guide-examples-syntax-and-advanced-uses\/\">Python Dictionary &#8211; Your Complete Guide<\/a> &#8211; Explore the power of Python dictionaries with this comprehensive guide, covering examples, syntax, and advanced uses.<\/p>\n<\/li>\n<li>\n<p>IOFlood&#8217;s <a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/ioflood.com\/blog\/python-defaultdict\/\">Python DefaultDict Guide &#8211; Handling Missing Keys with Ease<\/a> &#8211; Learn how to use Python&#8217;s defaultdict for handling missing keys.<\/p>\n<\/li>\n<li>\n<p><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/ioflood.com\/blog\/python-sort-dictionary-by-value\/\">Python Dictionary Sorting Techniques &#8211; Sorting by Values<\/a> &#8211; Dive into Python&#8217;s techniques for sorting dictionaries by values.<\/p>\n<\/li>\n<li>\n<p><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/docs.python.org\/3\/tutorial\/datastructures.html#dictionaries\" target=\"_blank\" rel=\"noopener\">Official Documentation on Dictionaries<\/a> &#8211; This is the official Python documentation on dictionaries.<\/p>\n<\/li>\n<li>\n<p><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/realpython.com\/python-dicts\/\" target=\"_blank\" rel=\"noopener\">Deep Dive Into Python Dictionaries<\/a> &#8211; This comprehensive guide from Real Python dives deeply into Python dictionaries. It covers all aspects of dictionaries including their definition, methods, and usage scenarios.<\/p>\n<\/li>\n<li>\n<p><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/www.geeksforgeeks.org\/python-dictionary\/\" target=\"_blank\" rel=\"noopener\">Python Dictionary Methods<\/a> &#8211; This article from Geeks for Geeks provides a detailed exploration of Python dictionary methods.<\/p>\n<\/li>\n<\/ol>\n<p>These resources provide a wealth of information on Python dictionaries and their methods, and can help you deepen your understanding of this essential Python feature.<\/p>\n<h2>Wrapping Up: Mastering Python Dictionary Methods<\/h2>\n<p>In this comprehensive guide, we&#8217;ve journeyed through the world of Python dictionary methods, unlocking the power of this essential tool in the Python ecosystem.<\/p>\n<p>We began with the basics, exploring fundamental methods like <code>get()<\/code>, <code>keys()<\/code>, <code>values()<\/code>, and <code>items()<\/code>. We then ventured into more advanced territory, delving into methods like <code>update()<\/code>, <code>pop()<\/code>, <code>setdefault()<\/code>, and <code>popitem()<\/code>. We also looked at alternative techniques for manipulating dictionaries, such as dictionary comprehensions, the <code>dict()<\/code> constructor, and third-party libraries.<\/p>\n<p>Along the way, we tackled common challenges you might encounter when using Python dictionary methods, such as KeyError and TypeError, providing you with solutions and workarounds for each issue.<\/p>\n<p>Here&#8217;s a quick comparison of the methods we&#8217;ve discussed:<\/p>\n<table>\n<thead>\n<tr>\n<th>Method<\/th>\n<th>Use Case<\/th>\n<th>Advantage<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>get()<\/code><\/td>\n<td>Accessing values<\/td>\n<td>Avoids KeyError for non-existent keys<\/td>\n<\/tr>\n<tr>\n<td><code>update()<\/code><\/td>\n<td>Modifying dictionaries<\/td>\n<td>Can add new key-value pairs or modify existing ones<\/td>\n<\/tr>\n<tr>\n<td><code>pop()<\/code><\/td>\n<td>Removing key-value pairs<\/td>\n<td>Removes a pair and returns the value<\/td>\n<\/tr>\n<tr>\n<td>Dictionary Comprehensions<\/td>\n<td>Creating dictionaries<\/td>\n<td>Provides a concise way to create dictionaries<\/td>\n<\/tr>\n<tr>\n<td><code>dict()<\/code> Constructor<\/td>\n<td>Creating dictionaries<\/td>\n<td>Useful for creating dictionaries from sequences<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Whether you&#8217;re a beginner just starting out with Python or an experienced developer looking to level up your Python dictionary skills, we hope this guide has given you a deeper understanding of Python dictionary methods and their capabilities.<\/p>\n<p>Armed with this knowledge, you&#8217;re now better equipped to manipulate and access data in Python dictionaries. Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Are you finding it challenging to work with Python dictionary methods? You&#8217;re not alone. Many developers find themselves puzzled when it comes to understanding and using these methods effectively. But, think of Python&#8217;s dictionary methods as a Swiss army knife &#8211; versatile and handy for various tasks. Whether you&#8217;re manipulating data, creating dynamic mappings, or [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":10819,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[121,123],"tags":[],"class_list":["post-4712","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-programming-coding","category-python","cat-121-id","cat-123-id","has_thumb"],"_links":{"self":[{"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/posts\/4712","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/comments?post=4712"}],"version-history":[{"count":11,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/posts\/4712\/revisions"}],"predecessor-version":[{"id":16575,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/posts\/4712\/revisions\/16575"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/media\/10819"}],"wp:attachment":[{"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/media?parent=4712"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/categories?post=4712"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/tags?post=4712"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}