{"id":3492,"date":"2023-08-14T22:33:33","date_gmt":"2023-08-15T05:33:33","guid":{"rendered":"https:\/\/ioflood.com\/blog\/?p=3492"},"modified":"2024-01-31T07:02:44","modified_gmt":"2024-01-31T14:02:44","slug":"python-merge-dictionaries-5-easy-methods-with-examples","status":"publish","type":"post","link":"https:\/\/ioflood.com\/blog\/python-merge-dictionaries-5-easy-methods-with-examples\/","title":{"rendered":"Python Merge Dictionaries | 5 Easy Methods with Examples"},"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\/08\/Computer-interface-graphic-displaying-Python-code-for-merging-dictionaries-focusing-on-combining-multiple-dictionaries-300x300.jpg\" alt=\"Computer interface graphic displaying Python code for merging dictionaries focusing on combining multiple dictionaries\" width=\"300\" height=\"300\" title=\"\"><\/figure>\n<\/div>\n<p>The flexibility of Python dictionaries is unparalleled, serving various purposes from data storage to complex code organization. But what if you need to merge multiple dictionaries? That&#8217;s when the magic of merging dictionaries in Python comes to the forefront.<\/p>\n<p>In this article, we will delve into the diverse techniques Python offers to merge dictionaries, their applications, and potential implications.<\/p>\n<p>Whether you&#8217;re an experienced Python developer or a novice seeking to broaden your Python skills, mastering the art of efficiently merging dictionaries will significantly enhance your programming toolkit. So, let&#8217;s dive deeper into the world of Python dictionaries!<\/p>\n<h2>TL;DR: How can I merge dictionaries in Python?<\/h2>\n<blockquote><p>\n  Python provides several methods to merge dictionaries, including the <code>update()<\/code> method, the <code>|<\/code> operator, the <code>**<\/code> operator, the <code>ChainMap<\/code> class from the collections module, and the <code>reduce()<\/code> function from the functools module. For example, the simplest way is to use the <code>update()<\/code> method:\n<\/p><\/blockquote>\n<pre><code class=\"language-python line-numbers\"># Example\n\ndict1 = {'a': 1, 'b': 2}\ndict2 = {'b': 3, 'c': 4}\ndict1.update(dict2)\nprint(dict1)  # Output: {'a': 1, 'b': 3, 'c': 4}\n<\/code><\/pre>\n<blockquote><p>\n  Each of these methods has its own advantages and trade-offs. Continue reading for a comprehensive understanding of these methods, their usage, and implications.\n<\/p><\/blockquote>\n<h2>5 Python Dictionary Merging Techniques<\/h2>\n<p>Python presents numerous techniques for merging dictionaries, each with its unique strengths, limitations, and practical applications. Let&#8217;s explore these methods and comprehend their functionality through examples.<\/p>\n<h3>1: The update() Method<\/h3>\n<p>A straightforward approach to merge dictionaries in Python is the <code>update()<\/code> method. This method integrates one dictionary into another. If there are shared keys, the values of the second dictionary supersede those in the first.<\/p>\n<pre><code class=\"language-python line-numbers\"># Example\n\ndict1 = {'a': 1, 'b': 2}\ndict2 = {'b': 3, 'c': 4}\ndict1.update(dict2)\nprint(dict1)  # Output: {'a': 1, 'b': 3, 'c': 4}\n<\/code><\/pre>\n<h3>2: The Merge (|) Operator<\/h3>\n<p>Python 3.9 brought the merge (|) operator into the mix for combining dictionaries. Similar to <code>update()<\/code>, it fuses two dictionaries, and if there are shared keys, the second dictionary&#8217;s values replace the first&#8217;s.<\/p>\n<pre><code class=\"language-python line-numbers\"># Example\n\ndict1 = {'a': 1, 'b': 2}\ndict2 = {'b': 3, 'c': 4}\ndict3 = dict1 | dict2\nprint(dict3)  # Output: {'a': 1, 'b': 3, 'c': 4}\n<\/code><\/pre>\n<p>The merge (|) operator and update() method in Python are similar in that they both merge two dictionaries. However, there are a few differences that may make the merge operator preferable depending on your use case:<\/p>\n<ol>\n<li>Syntactical Elegance: The merge operator allows for a more concise, cleaner syntax compared to the update method. The merge operator can be used right within an expression, whereas update modifies the dictionary in place.<\/p>\n<\/li>\n<li>\n<p>Chain Merging: The merge operator allows for chaining of multiple dictionary merges, which can simplify code if you&#8217;re combining multiple dictionaries in a single line.<\/p>\n<\/li>\n<li>\n<p>Immutability: The merge (|) operation doesn\u2019t affect the original dictionaries. In contrast, update() alters the original dictionary which can be an issue if you need the originals unchanged.<\/p>\n<\/li>\n<li>\n<p>Later Python versions: It&#8217;s important to note that the &#8220;|&#8221; operator for dictionaries is available from Python 3.9 and onwards.<\/p>\n<\/li>\n<\/ol>\n<p>For example:<\/p>\n<pre><code class=\"language-python line-numbers\"># Using merge operator\ndict1 = {'a': 1, 'b': 2}\ndict2 = {'b': 3, 'c': 4}\ndict3 = {'d': 5, 'e': 6}\nresult = dict1 | dict2 | dict3\n\n# Using update method \ndict1 = {'a': 1, 'b': 2}\ndict2 = {'b': 3, 'c': 4}\ndict3 = {'d': 5, 'e': 6}\ndict1.update(dict2)\ndict1.update(dict3)\nresult = dict1\n<\/code><\/pre>\n<p>In these examples, both will output: <code>{'a': 1, 'b': 3, 'c': 4, 'd': 5, 'e': 6}<\/code> but the method and impact on original dictionaries are different.<\/p>\n<h3>3: The ** Operator<\/h3>\n<p>The double star ** operator is another tool for merging dictionaries. This operator unpacks a dictionary&#8217;s contents and is frequently used in function calls.<\/p>\n<pre><code class=\"language-python line-numbers\"># Example\n\ndict1 = {'a': 1, 'b': 2}\ndict2 = {'b': 3, 'c': 4}\ndict3 = {**dict1, **dict2}\nprint(dict3)  # Output: {'a': 1, 'b': 3, 'c': 4}\n<\/code><\/pre>\n<h3>4: The ChainMap Class from collections Module<\/h3>\n<p><code>ChainMap<\/code> is a class from the <code>collections<\/code> module providing an alternative for merging dictionaries. Unlike previous methods, <code>ChainMap<\/code> does not generate a new dictionary but constructs a list of dictionaries. When a key is accessed, it returns the value from the first dictionary in the list that contains the key.<\/p>\n<pre><code class=\"language-python line-numbers\"># Example\n\nfrom collections import ChainMap\ndict1 = {'a': 1, 'b': 2}\ndict2 = {'b': 3, 'c': 4}\ndict3 = ChainMap(dict1, dict2)\nprint(dict3.maps)  # Output: [{'a': 1, 'b': 2}, {'b': 3, 'c': 4}]\n<\/code><\/pre>\n<h3>5: The reduce() Function from functools Module<\/h3>\n<p>Another method to merge dictionaries is the <code>reduce()<\/code> function from the <code>functools<\/code> module. It applies a two-argument function cumulatively to an iterable&#8217;s items, from left to right, reducing the iterable to a single output.<\/p>\n<pre><code class=\"language-python line-numbers\"># Example\n\nfrom functools import reduce\ndict1 = {'a': 1, 'b': 2}\ndict2 = {'b': 3, 'c': 4}\ndict3 = reduce(lambda x, y: {**x, **y}, [dict1, dict2])\nprint(dict3)  # Output: {'a': 1, 'b': 3, 'c': 4}\n<\/code><\/pre>\n<h2>How To Decide Which Function to Use?<\/h2>\n<p>Each method comes with its own benefits and drawbacks, and the choice often hinges on your task&#8217;s specific requirements and the Python version you&#8217;re using. <code>update()<\/code>, <code>** operator<\/code>, and <code>reduce()<\/code> function are compatible with all Python versions, while the <code>merge (|)<\/code> operator is exclusive to Python 3.9 and later. <code>ChainMap<\/code>, on the other hand, provides a unique approach by not creating a new dictionary, making it more memory-efficient in scenarios with large dictionaries.<\/p>\n<table>\n<thead>\n<tr>\n<th><strong>Method<\/strong><\/th>\n<th><strong>Python Compatibility<\/strong><\/th>\n<th><strong>Creates New Dictionary<\/strong><\/th>\n<th><strong>Chaining<\/strong><\/th>\n<th><strong>Immutability<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>update() function<\/strong><\/td>\n<td>All versions<\/td>\n<td>No<\/td>\n<td>No<\/td>\n<td>Alters original<\/td>\n<\/tr>\n<tr>\n<td><strong>Merge (&#124;)<\/strong><\/td>\n<td>3.9 and above<\/td>\n<td>Yes<\/td>\n<td>Yes<\/td>\n<td>Doesn&#8217;t alter original<\/td>\n<\/tr>\n<tr>\n<td><strong>Double Star (&#42;&#42;)<\/strong><\/td>\n<td>All versions<\/td>\n<td>Yes<\/td>\n<td>Yes<\/td>\n<td>Doesn&#8217;t alter original<\/td>\n<\/tr>\n<tr>\n<td><strong>ChainMap Class<\/strong><\/td>\n<td>All versions<\/td>\n<td>No (Creates list of dictionaries)<\/td>\n<td>Yes<\/td>\n<td>Doesn&#8217;t alter original<\/td>\n<\/tr>\n<tr>\n<td><strong>reduce() Function<\/strong><\/td>\n<td>All versions<\/td>\n<td>Yes<\/td>\n<td>Yes (through iterable)<\/td>\n<td>Doesn&#8217;t alter original<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Keeping Values of Shared Keys During Dictionary Merging<\/h2>\n<p>A common hurdle when merging dictionaries in Python is the overriding of values. As we&#8217;ve seen earlier, if a key is present in both dictionaries during a merge, the second dictionary&#8217;s value replaces the first&#8217;s. But what if you need to retain all values of common keys?<\/p>\n<p>Python offers two solution to merge dictionaries while preserving all values of shared keys. This can be accomplished using dictionary comprehension paired with the <code>items()<\/code> or the <code>get()<\/code> method.<\/p>\n<h3>Dictionary merging using the <code>get()<\/code> method<\/h3>\n<p>Python offers a solution to merge dictionaries while preserving all values of shared keys using the <code>get()<\/code> method in dictionary comprehension.<\/p>\n<p>This method retrievs the values corresponding to a given key, defaulting to a specified value (in this example, an empty list) if the key does not exist in the dictionary. In the following Python code snippet, the dictionaries <code>dict1<\/code> and <code>dict2<\/code> are merged using this approach:<\/p>\n<pre><code class=\"language-python line-numbers\">dict1 = {'a': 1, 'b': 2}\ndict2 = {'b': 3, 'c': 4}\nmerged_dict = {k: [dict1.get(k, []), dict2.get(k, [])] for k in set(dict1) | set(dict2)}\nprint(merged_dict)  # Output: {'b': [2, 3], 'a': [1], 'c': [], 'b': [3]}\n<\/code><\/pre>\n<p>Here is a table that clearly shows the input dictionaries and the resulting dictionary after the merge:<\/p>\n<table>\n<thead>\n<tr>\n<th>Input Dictionaries<\/th>\n<th>Resulting Dictionary<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>dict1 = {&#8216;a&#8217;: 1, &#8216;b&#8217;: 2}<\/td>\n<td>{&#8216;a&#8217;: [1], &#8216;b&#8217;: [2, 3], &#8216;c&#8217;: [3]}<\/td>\n<\/tr>\n<tr>\n<td>dict2 = {&#8216;b&#8217;: 3, &#8216;c&#8217;: 4}<\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Notice how the resulting dictionary contains all the keys from both <code>dict1<\/code> and <code>dict2<\/code>, and the corresponding values are lists containing the values associated with each key in the original dictionaries.<\/p>\n<h3>Dictionary merging using the <code>items()<\/code> method<\/h3>\n<p>If you prefer to directly use the key-value pairs in a dictionary, the <code>items()<\/code> method is your friend. This method creates a view object consisting of tuple pairs that represent the dictionary&#8217;s keys and their corresponding values.<\/p>\n<p>To merge dictionaries and preserve all the values of shared keys, you can use dictionary comprehension with an if-else condition along with the <code>items()<\/code> method:<\/p>\n<pre><code class=\"language-python line-numbers\">dict1 = {'a': 1, 'b': 2}\ndict2 = {'b': 3, 'c': 4}\nmerged_dict = {k: [v] if k not in dict2 else [v, dict2[k]] for k, v in dict1.items()}\nmerged_dict.update({k: [v] for k, v in dict2.items() if k not in dict1})\nprint(merged_dict)  # Output: {'a': [1], 'b': [2, 3], 'c': [4]}\n<\/code><\/pre>\n<p>Here is a table that clearly shows the input dictionaries and the resulting dictionary after the merge:<\/p>\n<table>\n<thead>\n<tr>\n<th>Input Dictionaries<\/th>\n<th>Resulting Dictionary<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>dict1 = {&#8216;a&#8217;: 1, &#8216;b&#8217;: 2}<\/td>\n<td>{&#8216;a&#8217;: [1], &#8216;b&#8217;: [2, 3], &#8216;c&#8217;: [4]}<\/td>\n<\/tr>\n<tr>\n<td>dict2 = {&#8216;b&#8217;: 3, &#8216;c&#8217;: 4}<\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>In this code snippet, the resulting <code>merged_dict<\/code> conserves all keys from <code>dict1<\/code> and <code>dict2<\/code>. The corresponding values are lists that contain the values from the original dictionaries. Keys that are unique to one dictionary have a one-item list as the value.<\/p>\n<blockquote><p>\n  Note: These methods do have some drawbacks. They can lead to heightened memory usage, particularly when dealing with large dictionaries, as they form a new dictionary and stores multiple values for shared keys. This could potentially affect your program&#8217;s performance.\n<\/p><\/blockquote>\n<h2>The Importance of Merging Dictionaries in Python<\/h2>\n<p>Having established a solid understanding of Python dictionaries merging techniques, it&#8217;s time to explore scenarios where merging dictionaries becomes a necessity.<\/p>\n<h3>Scenarios Necessitating Dictionary Merging<\/h3>\n<p>Here is an example of merging user data from different sources:<\/p>\n<pre><code class=\"language-python line-numbers\"># User data from different sources\ndata1 = {'name': 'John', 'age': 30, 'city': 'New York'}\ndata2 = {'name': 'Jane', 'age': 28, 'city': 'Los Angeles'}\n\n# Merging the dictionaries\ndatabase = {**data1, **data2}\nprint(database)  # Output: {'name': 'Jane', 'age': 28, 'city': 'Los Angeles'}\n<\/code><\/pre>\n<p>Dictionary merging is a frequent need in Python programming. For example, you might have data dispersed across multiple dictionaries that you need to amalgamate for efficient data manipulation.<\/p>\n<p>Or, you might be interacting with APIs that return data as dictionaries, necessitating their merger for further processing.<\/p>\n<h3>The Idea of a Unified Database<\/h3>\n<p>Imagine a situation where you are constructing a unified database from multiple sources, each supplying data as a dictionary. The keys serve as data fields, and the values as data entries.<\/p>\n<p>Merging these dictionaries can help you create a comprehensive database, simplifying data manipulation and analysis.<\/p>\n<pre><code class=\"language-python line-numbers\"># Example\n\nuser_data1 = {'name': 'John', 'age': 30, 'city': 'New York'}\nuser_data2 = {'name': 'Jane', 'age': 28, 'city': 'Los Angeles'}\ndatabase = [user_data1, user_data2]\n<\/code><\/pre>\n<p>In this example, <code>user_data1<\/code> and <code>user_data2<\/code> could represent data from distinct sources. By merging these dictionaries into a list (a basic form of merging), we form a common users database.<\/p>\n<h2>Python Dictionaries Explained<\/h2>\n<p>To better understand merging dictionaries, it&#8217;s can be helpful to understand what a dictionary in Python entails.<\/p>\n<p>A dictionary in Python is an integral data type used to store data in key-value pairs, where each pair is separated by a colon <code>:<\/code>, and the pairs are contained within curly braces <code>{}<\/code>.<\/p>\n<pre><code class=\"language-python line-numbers\"># Python dictionary example\n\nmy_dict = {'name': 'John', 'age': 30, 'city': 'New York'}\nprint(my_dict)  # Output: {'name': 'John', 'age': 30, 'city': 'New York'}\n<\/code><\/pre>\n<p>In this example, &#8216;name&#8217;, &#8216;age&#8217;, and &#8216;city&#8217; are keys, while &#8216;John&#8217;, 30, and &#8216;New York&#8217; are their corresponding values.<\/p>\n<h3>Mutable and Immutable Values<\/h3>\n<p>It&#8217;s vital to note that dictionaries have immutable keys. This implies that once a key is assigned, it cannot be altered. However, the values associated with the keys are mutable and can be modified.<\/p>\n<p>See our article for an explanation of <a href=\"https:\/\/ioflood.com\/blog\/mutable-vs-immutable-in-python-object-data-types-explained\/\">Mutable vs Immutable objects<\/a> in Python.<\/p>\n<h3>Example Dictionary<\/h3>\n<p>Here is an example of a more complex dictionary, which includes another dictionary as a value:<\/p>\n<pre><code class=\"language-python line-numbers\"># Python nested dictionary example\n\nmy_dict = {'name': 'John', 'age': 30, 'address': {'street': '123 Main St', 'city': 'New York', 'zip': '10001'}}\nprint(my_dict)  # Output: {'name': 'John', 'age': 30, 'address': {'street': '123 Main St', 'city': 'New York', 'zip': '10001'}}\n<\/code><\/pre>\n<p>Dictionaries are fundamental to Python programming, particularly in data manipulation. They offer a flexible way to access and organize data. For instance, if you&#8217;re dealing with a vast amount of data, you can utilize a dictionary to construct a database, using keys as data identifiers and values as data elements.<\/p>\n<p>Furthermore, Python dictionaries exhibit exceptional flexibility in managing complex data structures. They can accommodate multiple data types, including objects, and even other dictionaries, enabling the creation of nested data structures. This versatility makes dictionaries an indispensable tool for Python programmers.<\/p>\n<h2>Further Resources for Python Dictionaries<\/h2>\n<ul>\n<li><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/ioflood.com\/blog\/python-dictionary-guide-examples-syntax-and-advanced-uses\/\">Enhance Your Python Skills with Dictionary Manipulation<\/a> by mastering dictionary syntax and exploring advanced dictionary features.<\/li>\n<\/ul>\n<p>You may also be interested in these other online resources:<\/p>\n<ul>\n<li><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/ioflood.com\/blog\/iterate-a-dictionary-in-python-guide-with-examples\/\">Iterating Over Python Dictionaries &#8211; A Comprehensive Tutorial<\/a> &#8211; Learn how to iterate through Python dictionaries and access their elements.<\/p>\n<\/li>\n<li>\n<p><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/ioflood.com\/blog\/python-ordereddict\/\">Python Ordered Dictionary &#8211; Maintaining Order in Dictionaries<\/a> &#8211; Explore Python&#8217;s OrderedDict and understand its role in maintaining order.<\/p>\n<\/li>\n<li>\n<p><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/www.simplilearn.com\/tutorials\/python-tutorial\/python-sets-and-dictionaries\" target=\"_blank\" rel=\"noopener\">Python Sets and Dictionaries<\/a> &#8211; This tutorial discusses both Python sets and dictionaries. It covers their definitions, usage, and methods to perform various operations.<\/p>\n<\/li>\n<li>\n<p><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/en.wikibooks.org\/wiki\/Python_Programming\/Dictionaries\" target=\"_blank\" rel=\"noopener\">Python Programming\/Dictionaries<\/a> &#8211; An in-depth Wikibooks entry on Python dictionaries. It offers a comprehensive understanding of the data structure.<\/p>\n<\/li>\n<li>\n<p><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/gist.github.com\/angstwad\/bf22d1822c38a92ec0a9\" target=\"_blank\" rel=\"noopener\">Python Dictionaries Cheat Sheet<\/a> &#8211; This gist provides a quick reference or cheat sheet for Python dictionaries covering all the commonly used operations and methods.<\/p>\n<\/li>\n<\/ul>\n<h2>Final Thoughts<\/h2>\n<p>Throughout this article, we&#8217;ve delved into various techniques for merging dictionaries, each with its distinct advantages and potential implications.<\/p>\n<p>From the straightforward <code>update()<\/code> method to the memory-efficient <code>ChainMap<\/code> from the collections module, Python provides an array of options for dictionary merging. We&#8217;ve also dissected the challenges associated with merging dictionaries, such as value overriding and potential spikes in memory usage.<\/p>\n<p>Moreover, we&#8217;ve explored how to retain all values of shared keys during a merge, a technique that can be particularly beneficial when you need to conserve all data from your dictionaries.<\/p>\n<p>Whether you&#8217;re constructing a unified database from multiple sources, interacting with APIs, or simply manipulating data, proficiently merging dictionaries can significantly optimize your code and smooth your programming journey.<\/p>\n<blockquote><p>\n  For more on Python&#8217;s diverse capabilities, <a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/ioflood.com\/blog\/python-syntax-cheat-sheet\/\">check out our cheat sheet here<\/a>.\n<\/p><\/blockquote>\n<p>So, the next time you&#8217;re tasked with merging dictionaries in Python, recall the methods discussed in this article, and select the one that best suits your situation. Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The flexibility of Python dictionaries is unparalleled, serving various purposes from data storage to complex code organization. But what if you need to merge multiple dictionaries? That&#8217;s when the magic of merging dictionaries in Python comes to the forefront. In this article, we will delve into the diverse techniques Python offers to merge dictionaries, their [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":16714,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[121,123],"tags":[],"class_list":["post-3492","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\/3492","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=3492"}],"version-history":[{"count":13,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/posts\/3492\/revisions"}],"predecessor-version":[{"id":16726,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/posts\/3492\/revisions\/16726"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/media\/16714"}],"wp:attachment":[{"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/media?parent=3492"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/categories?post=3492"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/tags?post=3492"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}