{"id":5535,"date":"2021-09-23T02:00:00","date_gmt":"2021-09-23T00:00:00","guid":{"rendered":"https:\/\/alvarotrigo.com\/epa\/replace-text-with-jquery\/"},"modified":"2024-02-08T00:31:19","modified_gmt":"2024-02-07T23:31:19","slug":"replace-text-with-jquery","status":"publish","type":"post","link":"https:\/\/alvarotrigo.com\/blog\/replace-text-with-jquery\/","title":{"rendered":"Replace text with jQuery [with examples]"},"content":{"rendered":"<p>To replace the text of any element using jQuery use the <code>text<\/code> function together with the <code>replace<\/code> function of JavaScript. For example: <code>$(\"#element\").text($(\"#element\").text().replace(\"Hi\", \"Bye\"));<\/code>.<\/p>\n<p>Here&#8217;s the step by step process:<\/p>\n<ul class=\"wp-block-list\">\n<li>Find and select the element containing the text.<\/li>\n<li>Use the jQuery <code>text<\/code> function to get its text.<\/li>\n<li>Replace the text using <code>replace<\/code>.<\/li>\n<li>Pass the result of this process to the <code>text<\/code> function to the same element.<\/li>\n<\/ul>\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>The <code>replace()<\/code> admits two parameters. The first is the value we want to replace (or the regular expression) and the second is the new string that will replace it. It returns the new generated string.<\/p>\n<\/blockquote>\n<p>Let&#8217;s say we have a string saying &#8220;Hi Paul&#8221; and we want to replace it for &#8220;Bye Paul&#8221;.<\/p>\n<p>We can do it all in a single line like this:<\/p>\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\"><span class=\"hljs-comment\">\/\/ Assuming #element is the ID of the element containing<\/span>\n<span class=\"hljs-comment\">\/\/ the text to be replaced<\/span>\n$(<span class=\"hljs-string\">\"#element\"<\/span>).text($(<span class=\"hljs-string\">\"#element\"<\/span>).text().replace(<span class=\"hljs-string\">\"Hi\"<\/span>, <span class=\"hljs-string\">\"Bye\"<\/span>));\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>If that looks a bit confusing to you, we can split it in multiple lines to make it easier to read:<\/p>\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">\n<span class=\"hljs-comment\">\/\/ Same as above, but spread in multiple lines<\/span>\n<span class=\"hljs-keyword\">const<\/span> element = $(<span class=\"hljs-string\">\"#element\"<\/span>);\n<span class=\"hljs-keyword\">const<\/span> textToReplace = element.text();\n<span class=\"hljs-keyword\">const<\/span> newText = textToReplace.replace(<span class=\"hljs-string\">\"Hi\"<\/span>, <span class=\"hljs-string\">\"Bye\"<\/span>);\nelement.text(newText); \n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>Easy right? Now, what if you want to <strong>change the text<\/strong> when clicking on a button? Or perhaps you want to replace multiple paragraphs?<\/p>\n<p>Here&#8217;s a list of the most common scenarios for text replacement. All of them <strong>using jQuery<\/strong>:<\/p>\n<h2 class=\"wp-block-heading\" id=\"examples-replacing-strings-in-jquery%3A\">Examples replacing strings in jQuery:<\/h2>\n<h3 class=\"wp-block-heading\" id=\"replace-the-text-of-an-element-on-click%3A\">Replace the text of an element on click:<\/h3>\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">const<\/span> changeText = <span class=\"hljs-function\">(<span class=\"hljs-params\">e<\/span>) =&gt;<\/span> {\n  \n  <span class=\"hljs-comment\">\/\/ Multiple lines solution<\/span>\n  <span class=\"hljs-keyword\">const<\/span> element = $(<span class=\"hljs-string\">\"#element\"<\/span>);\n  <span class=\"hljs-keyword\">const<\/span> textToReplace = element.text();\n  <span class=\"hljs-keyword\">const<\/span> newText = textToReplace.replace(<span class=\"hljs-string\">\"Hi\"<\/span>, <span class=\"hljs-string\">\"Bye\"<\/span>);\n  element.text(newText);\n};\n\n<span class=\"hljs-comment\">\/\/ Attaching the click event on the button<\/span>\n$(<span class=\"hljs-built_in\">document<\/span>).on(<span class=\"hljs-string\">'click'<\/span>, <span class=\"hljs-string\">'#changeText'<\/span>, changeText);\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_powZLJG\" data-src=\"\/\/codepen.io\/anon\/embed\/powZLJG?height=450&amp;theme-id=1&amp;slug-hash=powZLJG&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed powZLJG\" title=\"CodePen Embed powZLJG\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n<h3 class=\"wp-block-heading\" id=\"replace-multiple-appearances-of-the-same-string\">Replace multiple appearances of the same string<\/h3>\n<p>In order to replace all appearances of a string we have to use regular expressions. Instead of using this:<\/p>\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">textToReplace.replace(<span class=\"hljs-string\">\"Hi\"<\/span>, <span class=\"hljs-string\">\"Bye\"<\/span>);\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>We have to use the following:<\/p>\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">textToReplace.replace(<span class=\"hljs-regexp\">\/Hi\/g<\/span>, <span class=\"hljs-string\">\"Bye\"<\/span>);\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>Notice we also removed the double quotes around &#8220;Hi&#8221; and we added the global flag <code>g<\/code> after the last <code>\/<\/code>. This is what allows us to search globally, or in other words, to look for all appearances for the searched string.<\/p>\n<p>Here&#8217;s an example:<\/p>\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\"><span class=\"hljs-comment\">\/\/ Replaces all appearances of \"Hi\" for \"Bye\"<\/span>\n<span class=\"hljs-keyword\">var<\/span> element = $(<span class=\"hljs-string\">\"#element\"<\/span>);\nelement.text(element.text().replace(<span class=\"hljs-regexp\">\/Hi\/g<\/span>, <span class=\"hljs-string\">\"Bye\"<\/span>));\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_GREBxEx\" data-src=\"\/\/codepen.io\/anon\/embed\/GREBxEx?height=450&amp;theme-id=1&amp;slug-hash=GREBxEx&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed GREBxEx\" title=\"CodePen Embed GREBxEx\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n<h3 class=\"wp-block-heading\" id=\"replace-multiple-words-at-the-same-time\">Replace multiple words at the same time<\/h3>\n<p>We&#8217;ll have to use a regular expression as we did above, but this time, to add multiple words, we will separate them by <code>|<\/code>.<\/p>\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\"><span class=\"hljs-comment\">\/\/ Replaces the words \"Hi\", \"Hello\" and \"Hey\" for \"Bye\"<\/span>\nelement.text(element.text().replace(<span class=\"hljs-regexp\">\/Hi|Hello|Hey\/g<\/span>, <span class=\"hljs-string\">\"Bye\"<\/span>));\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<h3 class=\"wp-block-heading\" id=\"replace-case-insensitive-text\">Replace case-insensitive text<\/h3>\n<p>This applies when you want to replace a string no matter if it appears in uppercases, lowercases or a combination of both.<\/p>\n<p>Again, we&#8217;ll have to use regular expressions for it. We&#8217;ll make use of the <code>i<\/code> flag that we&#8217;ll pass after the last <code>\/<\/code>, together with the <code>g<\/code> that allows for a global search as mentioned before:<\/p>\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\"><span class=\"hljs-comment\">\/\/ Replacing \"Hi\" and \"hi\" for \"Bye\"<\/span>\nelement.text(element.text().replace(<span class=\"hljs-regexp\">\/hi\/gi<\/span>, <span class=\"hljs-string\">\"Bye\"<\/span>));\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<h3 class=\"wp-block-heading\" id=\"replace-a-word-in-multiple-texts\">Replace a word in multiple texts<\/h3>\n<p>Let&#8217;s imagine we want to replace a word in multiple elements in our website. All we have to do is iterate over them and call our function or just call the function multiple times on each of them:<\/p>\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\"><span class=\"hljs-comment\">\/\/ Iterating over all &lt;li&gt; elements to replace a word<\/span>\n$(<span class=\"hljs-string\">'#myList li'<\/span>).each(<span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span>(<span class=\"hljs-params\"><\/span>)<\/span>{\n    $(<span class=\"hljs-keyword\">this<\/span>).text($(<span class=\"hljs-keyword\">this<\/span>).text().replace(<span class=\"hljs-regexp\">\/Hi\/g<\/span>, <span class=\"hljs-string\">\"Bye\"<\/span>));\n}); \n\n<span class=\"hljs-comment\">\/\/ Replacing two other texts in other elements<\/span>\n<span class=\"hljs-keyword\">var<\/span> element1 = $(<span class=\"hljs-string\">'#element1'<\/span>);\n<span class=\"hljs-keyword\">var<\/span> element2 = $(<span class=\"hljs-string\">'#element2'<\/span>);\n\nelement1.text(element1.text().replace(<span class=\"hljs-regexp\">\/Hi\/g<\/span>, <span class=\"hljs-string\">\"Bye\"<\/span>));\nelement2.text(element2.text().replace(<span class=\"hljs-regexp\">\/Hi\/g<\/span>, <span class=\"hljs-string\">\"Bye\"<\/span>));\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-9\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_GREBxyd\" data-src=\"\/\/codepen.io\/anon\/embed\/GREBxyd?height=450&amp;theme-id=1&amp;slug-hash=GREBxyd&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed GREBxyd\" title=\"CodePen Embed GREBxyd\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n<h3 class=\"wp-block-heading\" id=\"remove-text-using-replace\">Remove text using replace<\/h3>\n<p>Of course, you can use this same method to replace any text for an empty string removing the searched string from our text.<\/p>\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-10\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\"><span class=\"hljs-comment\">\/\/ Removing word from a string using jQuery<\/span>\n<span class=\"hljs-keyword\">var<\/span> element = $(<span class=\"hljs-string\">\"#element\"<\/span>);\nelement.text(element.text().replace(<span class=\"hljs-string\">\"Hi\"<\/span>, <span class=\"hljs-string\">\"\"<\/span>));\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-10\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_RwgBywe\" data-src=\"\/\/codepen.io\/anon\/embed\/RwgBywe?height=450&amp;theme-id=1&amp;slug-hash=RwgBywe&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed RwgBywe\" title=\"CodePen Embed RwgBywe\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n<h3 class=\"wp-block-heading\" id=\"replace-a-whole-text%2C-word%2C-or-sentence\">Replace a whole text, word, or sentence<\/h3>\n<p>We can replace the whole text of any element on our page by using the <code>text<\/code> function of jQuery. It&#8217;s even more simple yet:<\/p>\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-11\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">$(<span class=\"hljs-string\">\"#element\"<\/span>).text(<span class=\"hljs-string\">\"What's up!\"<\/span>);\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-11\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_WNOKJQN\" data-src=\"\/\/codepen.io\/anon\/embed\/WNOKJQN?height=450&amp;theme-id=1&amp;slug-hash=WNOKJQN&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed WNOKJQN\" title=\"CodePen Embed WNOKJQN\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n<h3 class=\"wp-block-heading\" id=\"replace-html-string-with-jquery\">Replace HTML string with jQuery<\/h3>\n<p>In a similar way, we can replace the whole HTML content by using the <code>html<\/code> function:<\/p>\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-12\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">$(<span class=\"hljs-string\">\"#element\"<\/span>).html(<span class=\"hljs-string\">\"&lt;i&gt;This is my italic text&lt;\/i&gt;\"<\/span>);\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-12\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<h2 class=\"wp-block-heading\" id=\"conlusion\">Conlusion<\/h2>\n<p>By using jQuery in combination of JavaScript functions we are able to replace strings in elements, texts and even JavaScript variables.<\/p>\n<p>Unlike in other languages, in JavaScript the replacement of multiple appearances forces us to use regular expressions. This can be a bit more scary at first and once you know the basis it opens a whole new world of opportunities for us.<\/p>\n<p>I hope this articles serves as a way to clarify the different ways we can use jQuery to replace strings and texts on your site.<\/p>\n<p>If you are learning JavaScript check out <a href=\"https:\/\/alvarotrigo.com\/blog\/best-way-learn-javascript\/\">what&#8217;s the best way to learn JavaScript!<\/a><\/p>\n<h2 class=\"wp-block-heading\" id=\"related-articles\">Related articles<\/h2>\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/alvarotrigo.com\/blog\/jquery-radio-button-checked\/\">Check when a radio button is checked using jQuery<\/a>.<\/li>\n<li><a href=\"https:\/\/alvarotrigo.com\/blog\/jquery-checkbox-checked\/\">Check when a checkbox is checked using jQuery<\/a>.<\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>How to replace a string with jQuery? Here we explain how to do it. Examples included!<\/p>\n","protected":false},"author":1,"featured_media":5534,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[120],"tags":[10,18],"class_list":["post-5535","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jquery","tag-javascript","tag-jquery"],"acf":[],"_links":{"self":[{"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/posts\/5535","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/comments?post=5535"}],"version-history":[{"count":2,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/posts\/5535\/revisions"}],"predecessor-version":[{"id":8974,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/posts\/5535\/revisions\/8974"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/media\/5534"}],"wp:attachment":[{"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/media?parent=5535"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/categories?post=5535"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/tags?post=5535"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}