{"id":15,"date":"2023-03-15T05:08:34","date_gmt":"2023-03-15T05:08:34","guid":{"rendered":"https:\/\/davidshobbies.com\/?p=15"},"modified":"2023-03-15T13:16:04","modified_gmt":"2023-03-15T13:16:04","slug":"jq-and-yq-and-you","status":"publish","type":"post","link":"https:\/\/davidshobbies.com\/?p=15","title":{"rendered":"Jq (and Yq) and You"},"content":{"rendered":"\n<p>One of the most structured data formats used today is JSON.  Most programming languages have libraries to both parse and generate it, but what about us humans?  What if you need to work with JSON blobs that are being returned by curl, or a big config file, but you don&#8217;t want to mess around with writing a script?  <a href=\"https:\/\/stedolan.github.io\/jq\/\">Jq<\/a> is your tool.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Your First Filter<\/h2>\n\n\n\n<p>In a very basic example, lets assume you want to grab the whois information for an IP address, and since you&#8217;re feeling weird, you decide to use cURL to talk to ARIN&#8217;s WHOIS api:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u276f curl -H \"Accept: application\/json\" http:\/\/whois.arin.net\/rest\/ip\/8.8.8.8\n{\"net\":{\"@xmlns\":{\"ns3\":\"http:\\\/\\\/www.arin.net\\\/whoisrws\\\/netref\\\/v2\",\"ns2\":\"http:\\\/\\\/www.arin.net\\\/whoisrws\\\/rdns\\\/v1\",\"$\":\"http:\\\/\\\/www.arin.net\\\/whoisrws\\\/core\\\/v1\"},\"@copyrightNotice\":\"Copyright 1997-2023, American Registry for Internet Numbers, Ltd.\",\"@inaccuracyReportUrl\":\"https:\\\/\\\/www.arin.net\\\/resources\\\/registry\\\/whois\\\/inaccuracy_reporting\\\/\",\"@termsOfUse\":\"https:\\\/\\\/www.arin.net\\\/resources\\\/registry\\\/whois\\\/tou\\\/\",\"registrationDate\":{\"$\":\"2014-03-14T16:52:05-04:00\"},\"rdapRef\":{\"$\":\"https:\\\/\\\/rdap.arin.net\\\/registry\\\/ip\\\/8.8.8.0\"},\"ref\":{\"$\":\"https:\\\/\\\/whois.arin.net\\\/rest\\\/net\\\/NET-8-8-8-0-1\"},\"endAddress\":{\"$\":\"8.8.8.255\"},\"handle\":{\"$\":\"NET-8-8-8-0-1\"},\"name\":{\"$\":\"LVLT-GOGL-8-8-8\"},\"netBlocks\":{\"netBlock\":{\"cidrLength\":{\"$\":\"24\"},\"endAddress\":{\"$\":\"8.8.8.255\"},\"description\":{\"$\":\"Reallocated\"},\"type\":{\"$\":\"A\"},\"startAddress\":{\"$\":\"8.8.8.0\"}}},\"resources\":{\"@copyrightNotice\":\"Copyright 1997-2023, American Registry for Internet Numbers, Ltd.\",\"@inaccuracyReportUrl\":\"https:\\\/\\\/www.arin.net\\\/resources\\\/registry\\\/whois\\\/inaccuracy_reporting\\\/\",\"@termsOfUse\":\"https:\\\/\\\/www.arin.net\\\/resources\\\/registry\\\/whois\\\/tou\\\/\",\"limitExceeded\":{\"@limit\":\"256\",\"$\":\"false\"}},\"orgRef\":{\"@handle\":\"GOGL\",\"@name\":\"Google LLC\",\"$\":\"https:\\\/\\\/whois.arin.net\\\/rest\\\/org\\\/GOGL\"},\"parentNetRef\":{\"@handle\":\"NET-8-0-0-0-1\",\"@name\":\"LVLT-ORG-8-8\",\"$\":\"https:\\\/\\\/whois.arin.net\\\/rest\\\/net\\\/NET-8-0-0-0-1\"},\"startAddress\":{\"$\":\"8.8.8.0\"},\"updateDate\":{\"$\":\"2014-03-14T16:52:05-04:00\"},\"version\":{\"$\":\"4\"}}}\n<\/code><\/pre>\n\n\n\n<p>Well, that worked, but the output isn&#8217;t exactly easily readable.  We&#8217;re going to write our first jq query to clean the output up.  The entire document is named <code>.<\/code>, so we&#8217;re just going to query that.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> curl -H \"Accept: application\/json\" http:\/\/whois.arin.net\/rest\/ip\/8.8.8.8 | jq .\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n100  1509    0  1509    0     0  13473      0 --:--:-- --:--:-- --:--:-- 13473\n{\n  \"net\": {\n    \"@xmlns\": {\n      \"ns3\": \"http:\/\/www.arin.net\/whoisrws\/netref\/v2\",\n      \"ns2\": \"http:\/\/www.arin.net\/whoisrws\/rdns\/v1\",\n      \"$\": \"http:\/\/www.arin.net\/whoisrws\/core\/v1\"\n    },\n    \"@copyrightNotice\": \"Copyright 1997-2023, American Registry for Internet Numbers, Ltd.\",\n    \"@inaccuracyReportUrl\": \"https:\/\/www.arin.net\/resources\/registry\/whois\/inaccuracy_reporting\/\",\n    \"@termsOfUse\": \"https:\/\/www.arin.net\/resources\/registry\/whois\/tou\/\",\n    \"registrationDate\": {\n      \"$\": \"2014-03-14T16:52:05-04:00\"\n    },\n    \"rdapRef\": {\n      \"$\": \"https:\/\/rdap.arin.net\/registry\/ip\/8.8.8.0\"\n    },\n    \"ref\": {\n      \"$\": \"https:\/\/whois.arin.net\/rest\/net\/NET-8-8-8-0-1\"\n    },\n    \"endAddress\": {\n      \"$\": \"8.8.8.255\"\n    },\n    \"handle\": {\n      \"$\": \"NET-8-8-8-0-1\"\n    },\n    \"name\": {\n      \"$\": \"LVLT-GOGL-8-8-8\"\n    },\n<\/code><\/pre>\n\n\n\n<p>I&#8217;ve truncated the output in the name of good taste, but you can see that jq formats the output in a nicely indented, readable manner.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Filtering For Attributes<\/h2>\n\n\n\n<p>Next, we&#8217;ll experiment with drilling down into the orgRef attribute of the net attribute:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> curl -H \"Accept: application\/json\" http:\/\/whois.arin.net\/rest\/ip\/8.8.8.8 | jq .net.orgRef\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n100  1509    0  1509    0     0   7984      0 --:--:-- --:--:-- --:--:--  7984\n{\n  \"@handle\": \"GOGL\",\n  \"@name\": \"Google LLC\",\n  \"$\": \"https:\/\/whois.arin.net\/rest\/org\/GOGL\"\n}\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Creating New JSON Documents<\/h2>\n\n\n\n<p>Jq isn&#8217;t limited to just filtering components of existing JSON documents.  You can use it to create a new document by combining subcomponents of the document you are parsing.  This also provides an example of how to handle special characters in key names.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u276f curl -H \"Accept: application\/json\" http:\/\/whois.arin.net\/rest\/ip\/8.8.8.8 | jq '{startAddr: .net.netBlocks.netBlock.startAddress.\"$\", endAddr: .net.netBlocks.netBlock.endAddress.\"$\", owner: .net.orgRef.\"@name\"}'\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n100  1509    0  1509    0     0   8026      0 --:--:-- --:--:-- --:--:--  8026\n{\n  \"startAddr\": \"8.8.8.0\",\n  \"endAddr\": \"8.8.8.255\",\n  \"owner\": \"Google LLC\"\n}\n<\/code><\/pre>\n\n\n\n<p>Jq also supports array access.  Because the ARIN API doesn&#8217;t have any endpoints that generate arrays, we&#8217;re moving on to <a href=\"https:\/\/api.punkapi.com\/v2\/beers\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/api.punkapi.com\/v2\/beers<\/a>.   This API returns an array of beer recipes, and we&#8217;re going to experiment with filtering that output.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Array Access<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>curl https:\/\/api.punkapi.com\/v2\/beers | jq .&#91;].name\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n100 46947    0 46947    0     0   254k      0 --:--:-- --:--:-- --:--:--  254k\n\"Buzz\"\n\"Trashy Blonde\"\n\"Berliner Weisse With Yuzu - B-Sides\"\n\"Pilsen Lager\"\n\"Avery Brown Dredge\"\n\"Electric India\"\n\"AB:12\"\n\"Fake Lager\"\n\"AB:07\"\n\"Bramling X\"\n\"Misspent Youth\"\n\"Arcade Nation\"\n\"Movember\"\n\"Alpha Dog\"\n\"Mixtape 8\"\n\"Libertine Porter\"\n\"AB:06\"\n\"Russian Doll \u2013 India Pale Ale\"\n\"Hello My Name Is Mette-Marit\"\n\"Rabiator\"\n\"Vice Bier\"\n\"Devine Rebel (w\/ Mikkeller)\"\n\"Storm\"\n\"The End Of History\"\n\"Bad Pixie\"\n<\/code><\/pre>\n\n\n\n<p>Array slices are also supported:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u276f curl https:\/\/api.punkapi.com\/v2\/beers | jq .&#91;0,3].name\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n100 46947    0 46947    0     0   309k      0 --:--:-- --:--:-- --:--:--  309k\n\"Buzz\"\n\"Pilsen Lager\"\n<\/code><\/pre>\n\n\n\n<p>As before, you can also create a new array from an old one:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl https:\/\/api.punkapi.com\/v2\/beers | jq '&#91;.&#91;0,3] | {name: .name, description: .description}]'\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n100 46947    0 46947    0     0   322k      0 --:--:-- --:--:-- --:--:--  325k\n&#91;\n  {\n    \"name\": \"Buzz\",\n    \"description\": \"A light, crisp and bitter IPA brewed with English and American hops. A small batch brewed only once.\"\n  },\n  {\n    \"name\": \"Pilsen Lager\",\n    \"description\": \"Our Unleash the Yeast series was an epic experiment into the differences in aroma and flavour provided by switching up your yeast. We brewed up a wort with a light caramel note and some toasty biscuit flavour, and hopped it with Amarillo and Centennial for a citrusy bitterness. Everything else is down to the yeast. Pilsner yeast ferments with no fruity esters or spicy phenols, although it can add a hint of butterscotch.\"\n  }\n]<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Yq<\/h2>\n\n\n\n<p>Jq is a great tool, but there are also lots of non-JSON documents floating around out in the internet.  Fortunately Andrey Kislyuk has written a jq wrapper called <a href=\"https:\/\/kislyuk.github.io\/yq\/\">yq<\/a>.  It lets you to work with YAML, XML, and TOML documents, running the jq queries you already know how to build.  This means that you can easily filter the output of that legacy XML API or those huge YAML documents you have to deal with.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the most structured data formats used today is JSON. Most programming languages have libraries to both parse and generate it, but what about<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[8],"tags":[5,7,3,6,4],"class_list":["post-15","post","type-post","status-publish","format-standard","hentry","category-software-tools","tag-cli","tag-devops","tag-jq","tag-json","tag-shell"],"aioseo_notices":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Jq (and Yq) and You - David&#039;s Hobbies<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/davidshobbies.com\/?p=15\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Jq (and Yq) and You - David&#039;s Hobbies\" \/>\n<meta property=\"og:description\" content=\"One of the most structured data formats used today is JSON. Most programming languages have libraries to both parse and generate it, but what about\" \/>\n<meta property=\"og:url\" content=\"https:\/\/davidshobbies.com\/?p=15\" \/>\n<meta property=\"og:site_name\" content=\"David&#039;s Hobbies\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-15T05:08:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-03-15T13:16:04+00:00\" \/>\n<meta name=\"author\" content=\"David\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"David\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/davidshobbies.com\\\/?p=15#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/davidshobbies.com\\\/?p=15\"},\"author\":{\"name\":\"David\",\"@id\":\"https:\\\/\\\/davidshobbies.com\\\/#\\\/schema\\\/person\\\/178ffd56b9731c5da84318cafedb52f7\"},\"headline\":\"Jq (and Yq) and You\",\"datePublished\":\"2023-03-15T05:08:34+00:00\",\"dateModified\":\"2023-03-15T13:16:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/davidshobbies.com\\\/?p=15\"},\"wordCount\":378,\"commentCount\":0,\"keywords\":[\"cli\",\"devops\",\"jq\",\"json\",\"shell\"],\"articleSection\":[\"Software Tools\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/davidshobbies.com\\\/?p=15#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/davidshobbies.com\\\/?p=15\",\"url\":\"https:\\\/\\\/davidshobbies.com\\\/?p=15\",\"name\":\"Jq (and Yq) and You - David&#039;s Hobbies\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/davidshobbies.com\\\/#website\"},\"datePublished\":\"2023-03-15T05:08:34+00:00\",\"dateModified\":\"2023-03-15T13:16:04+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/davidshobbies.com\\\/#\\\/schema\\\/person\\\/178ffd56b9731c5da84318cafedb52f7\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/davidshobbies.com\\\/?p=15#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/davidshobbies.com\\\/?p=15\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/davidshobbies.com\\\/?p=15#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/davidshobbies.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Jq (and Yq) and You\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/davidshobbies.com\\\/#website\",\"url\":\"https:\\\/\\\/davidshobbies.com\\\/\",\"name\":\"David&#039;s Hobbies\",\"description\":\"Nerdy stuff, for both work and play\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/davidshobbies.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/davidshobbies.com\\\/#\\\/schema\\\/person\\\/178ffd56b9731c5da84318cafedb52f7\",\"name\":\"David\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ff5cfc9cfbf2b5bd689c140a28b8396fbc5853b4f593d166ecaf4a588c09338d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ff5cfc9cfbf2b5bd689c140a28b8396fbc5853b4f593d166ecaf4a588c09338d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ff5cfc9cfbf2b5bd689c140a28b8396fbc5853b4f593d166ecaf4a588c09338d?s=96&d=mm&r=g\",\"caption\":\"David\"},\"url\":\"https:\\\/\\\/davidshobbies.com\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Jq (and Yq) and You - David&#039;s Hobbies","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":"https:\/\/davidshobbies.com\/?p=15","og_locale":"en_US","og_type":"article","og_title":"Jq (and Yq) and You - David&#039;s Hobbies","og_description":"One of the most structured data formats used today is JSON. Most programming languages have libraries to both parse and generate it, but what about","og_url":"https:\/\/davidshobbies.com\/?p=15","og_site_name":"David&#039;s Hobbies","article_published_time":"2023-03-15T05:08:34+00:00","article_modified_time":"2023-03-15T13:16:04+00:00","author":"David","twitter_card":"summary_large_image","twitter_misc":{"Written by":"David","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/davidshobbies.com\/?p=15#article","isPartOf":{"@id":"https:\/\/davidshobbies.com\/?p=15"},"author":{"name":"David","@id":"https:\/\/davidshobbies.com\/#\/schema\/person\/178ffd56b9731c5da84318cafedb52f7"},"headline":"Jq (and Yq) and You","datePublished":"2023-03-15T05:08:34+00:00","dateModified":"2023-03-15T13:16:04+00:00","mainEntityOfPage":{"@id":"https:\/\/davidshobbies.com\/?p=15"},"wordCount":378,"commentCount":0,"keywords":["cli","devops","jq","json","shell"],"articleSection":["Software Tools"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/davidshobbies.com\/?p=15#respond"]}]},{"@type":"WebPage","@id":"https:\/\/davidshobbies.com\/?p=15","url":"https:\/\/davidshobbies.com\/?p=15","name":"Jq (and Yq) and You - David&#039;s Hobbies","isPartOf":{"@id":"https:\/\/davidshobbies.com\/#website"},"datePublished":"2023-03-15T05:08:34+00:00","dateModified":"2023-03-15T13:16:04+00:00","author":{"@id":"https:\/\/davidshobbies.com\/#\/schema\/person\/178ffd56b9731c5da84318cafedb52f7"},"breadcrumb":{"@id":"https:\/\/davidshobbies.com\/?p=15#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/davidshobbies.com\/?p=15"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/davidshobbies.com\/?p=15#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/davidshobbies.com\/"},{"@type":"ListItem","position":2,"name":"Jq (and Yq) and You"}]},{"@type":"WebSite","@id":"https:\/\/davidshobbies.com\/#website","url":"https:\/\/davidshobbies.com\/","name":"David&#039;s Hobbies","description":"Nerdy stuff, for both work and play","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/davidshobbies.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/davidshobbies.com\/#\/schema\/person\/178ffd56b9731c5da84318cafedb52f7","name":"David","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ff5cfc9cfbf2b5bd689c140a28b8396fbc5853b4f593d166ecaf4a588c09338d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ff5cfc9cfbf2b5bd689c140a28b8396fbc5853b4f593d166ecaf4a588c09338d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ff5cfc9cfbf2b5bd689c140a28b8396fbc5853b4f593d166ecaf4a588c09338d?s=96&d=mm&r=g","caption":"David"},"url":"https:\/\/davidshobbies.com\/?author=1"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/davidshobbies.com\/index.php?rest_route=\/wp\/v2\/posts\/15","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/davidshobbies.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/davidshobbies.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/davidshobbies.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/davidshobbies.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=15"}],"version-history":[{"count":5,"href":"https:\/\/davidshobbies.com\/index.php?rest_route=\/wp\/v2\/posts\/15\/revisions"}],"predecessor-version":[{"id":22,"href":"https:\/\/davidshobbies.com\/index.php?rest_route=\/wp\/v2\/posts\/15\/revisions\/22"}],"wp:attachment":[{"href":"https:\/\/davidshobbies.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=15"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/davidshobbies.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=15"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/davidshobbies.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=15"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}