{"id":5122,"date":"2015-06-10T12:15:59","date_gmt":"2015-06-10T09:15:59","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=5122"},"modified":"2015-06-08T18:34:19","modified_gmt":"2015-06-08T15:34:19","slug":"python-look-ahead-multiple-elements-iteratorgenerator","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/","title":{"rendered":"Python: Look ahead multiple elements in an iterator\/generator"},"content":{"rendered":"<p>As part of the BBC live text scraping code I\u2019ve been working on I needed to take an iterator of raw events created by a generator and transform this into an iterator of cards shown in a match.<\/p>\n<p>The structure of the raw events I\u2019m interested in is as follows:<\/p>\n<ul>\n<li>Line 1: Player booked<\/li>\n<li>Line 2: Player fouled<\/li>\n<li>Line 3: Information about the foul<\/li>\n<\/ul>\n<p>e.g.<\/p>\n<pre class=\" brush:text\">events = [\r\n  {'event': u'Booking     Pedro (Barcelona) is shown the yellow card for a bad foul.', 'sortable_time': 5083, 'match_id': '32683310', 'formatted_time': u'84:43'}, \r\n  {'event': u'Rafinha (FC Bayern M\\xfcnchen) wins a free kick on the right wing.', 'sortable_time': 5078, 'match_id': '32683310', 'formatted_time': u'84:38'}, \r\n  {'event': u'Foul by Pedro (Barcelona).', 'sortable_time': 5078, 'match_id': '32683310', 'formatted_time': u'84:38'}\r\n]<\/pre>\n<p>We want to take these 3 raw events and create one \u2018booking event\u2019. We therefore need to have access to all 3 lines at the same time.<\/p>\n<p>I started with the following function:<\/p>\n<pre class=\" brush:py\">def cards(events):\r\n    events = iter(events)\r\n\u00a0\r\n    item = events.next()\r\n    next = events.next()\r\n    event_id = 0\r\n\u00a0\r\n    for next_next in events:\r\n        event = item[\"event\"]\r\n        booking = re.findall(\"Booking.*\", event)\r\n        if booking:\r\n            player = re.findall(\"Booking([^(]*)\", event)[0].strip()\r\n            team = re.findall(\"Booking([^(]*) \\((.*)\\)\", event)[0][1]\r\n\u00a0\r\n            associated_foul = [x for x in [(next, event_id+1), (next_next, event_id+2)]\r\n                                 if re.findall(\"Foul by.*\", x[0][\"event\"])]\r\n\u00a0\r\n            if associated_foul:\r\n                associated_foul = associated_foul[0]\r\n                yield event_id, associated_foul[1], player, team, item, \"yellow\"\r\n            else:\r\n                yield event_id, \"\", player, team, item, \"yellow\"\r\n\u00a0\r\n        item = next\r\n        next = next_next\r\n        event_id += 1<\/pre>\n<p>If we run the sample events through it we\u2019d see this output:<\/p>\n<pre class=\" brush:py\">&gt;&gt;&gt; for card_id, associated_foul, player, team, item, card_type in cards(iter(events)):\r\n      print card_id, associated_foul, player, team, item, card_type\r\n\u00a0\r\n0 2 Pedro Barcelona {'match_id': '32683310', 'event': u'Booking     Pedro (Barcelona) is shown the yellow card for a bad foul.', 'formatted_time': u'84:43', 'sortable_time': 5083} yellow<\/pre>\n<p>In retrospect, it\u2019s a bit of a hacky way of moving a window of 3 items over the iterator of raw events and yielding a \u2018booking\u2019 event if the regex matches.<\/p>\n<p>I thought there was probably a better way of doing this using <a href=\"https:\/\/docs.python.org\/2\/library\/itertools.html\">itertools<\/a> and <a href=\"http:\/\/stackoverflow.com\/questions\/6822725\/rolling-or-sliding-window-iterator-in-python\">indeed there is<\/a>!<\/p>\n<p>First we need to create a window function which will return us an iterator of tuples containing consecutive events:<\/p>\n<pre class=\" brush:py\">from itertools import tee, izip\r\n\u00a0\r\ndef window(iterable, size):\r\n    iters = tee(iterable, size)\r\n    for i in xrange(1, size):\r\n        for each in iters[i:]:\r\n            next(each, None)\r\n    return izip(*iters)<\/pre>\n<p>Now let\u2019s have a look at how it works using a simple example:<\/p>\n<pre class=\" brush:py\">&gt;&gt;&gt; numbers = iter(range(0,10))\r\n&gt;&gt;&gt; for triple in window(numbers, 3):\r\n      print triple\r\n\u00a0\r\n(0, 1, 2)\r\n(1, 2, 3)\r\n(2, 3, 4)\r\n(3, 4, 5)\r\n(4, 5, 6)\r\n(5, 6, 7)\r\n(6, 7, 8)\r\n(7, 8, 9)<\/pre>\n<p>Exactly what we need. Now let\u2019s plug the windows function into our cards function:<\/p>\n<pre class=\" brush:py\">def cards(events):\r\n    events = iter(events)\r\n    for event_id, triple in enumerate(window(events, 3)):\r\n        item = triple[0]\r\n        event = triple[0][\"event\"]\r\n\u00a0\r\n        booking = re.findall(\"Booking.*\", event)\r\n        if booking:\r\n            player = re.findall(\"Booking([^(]*)\", event)[0].strip()\r\n            team = re.findall(\"Booking([^(]*) \\((.*)\\)\", event)[0][1]\r\n\u00a0\r\n            associated_foul = [x for x in [(triple[1], event_id+1), (triple[2], event_id+2)]\r\n                                 if re.findall(\"Foul by.*\", x[0][\"event\"])]\r\n\u00a0\r\n            if associated_foul:\r\n                associated_foul = associated_foul[0]\r\n                yield event_id, associated_foul[1], player, team, item, \"yellow\"\r\n            else:\r\n                yield event_id, \"\", player, team, item, \"yellow\"<\/pre>\n<p>And finally check it still processes events correctly:<\/p>\n<pre class=\" brush:py\">&gt;&gt;&gt; for card_id, associated_foul, player, team, item, card_type in cards(iter(events)):\r\n      print card_id, associated_foul, player, team, item, card_type\r\n\u00a0\r\n0 2 Pedro Barcelona {'match_id': '32683310', 'event': u'Booking     Pedro (Barcelona) is shown the yellow card for a bad foul.', 'formatted_time': u'84:43', 'sortable_time': 5083} yellow<\/pre>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"http:\/\/www.markhneedham.com\/blog\/2015\/05\/28\/python-look-ahead-multiple-elements-in-an-iteratorgenerator\/\">Python: Look ahead multiple elements in an iterator\/generator<\/a> from our <a href=\"http:\/\/www.webcodegeeks.com\/wcg\/\">WCG partner<\/a> Mark Needham at the <a href=\"http:\/\/www.markhneedham.com\/blog\/\">Mark Needham Blog<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>As part of the BBC live text scraping code I\u2019ve been working on I needed to take an iterator of raw events created by a generator and transform this into an iterator of cards shown in a match. The structure of the raw events I\u2019m interested in is as follows: Line 1: Player booked Line &hellip;<\/p>\n","protected":false},"author":48,"featured_media":1651,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[53],"tags":[],"class_list":["post-5122","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Python: Look ahead multiple elements in an iterator\/generator - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"As part of the BBC live text scraping code I\u2019ve been working on I needed to take an iterator of raw events created by a generator and transform this into\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python: Look ahead multiple elements in an iterator\/generator - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"As part of the BBC live text scraping code I\u2019ve been working on I needed to take an iterator of raw events created by a generator and transform this into\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2015-06-10T09:15:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Mark Needham\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mark Needham\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/\"},\"author\":{\"name\":\"Mark Needham\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/848a54e2ee724e46069ce36c2e52e98e\"},\"headline\":\"Python: Look ahead multiple elements in an iterator\/generator\",\"datePublished\":\"2015-06-10T09:15:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/\"},\"wordCount\":244,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/\",\"name\":\"Python: Look ahead multiple elements in an iterator\/generator - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"datePublished\":\"2015-06-10T09:15:59+00:00\",\"description\":\"As part of the BBC live text scraping code I\u2019ve been working on I needed to take an iterator of raw events created by a generator and transform this into\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/python\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Python: Look ahead multiple elements in an iterator\/generator\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/848a54e2ee724e46069ce36c2e52e98e\",\"name\":\"Mark Needham\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5489baed26ce2d932bf951ecfb47afe80bec45d3648c23521d87c83b8f1c3ea9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5489baed26ce2d932bf951ecfb47afe80bec45d3648c23521d87c83b8f1c3ea9?s=96&d=mm&r=g\",\"caption\":\"Mark Needham\"},\"sameAs\":[\"http:\/\/www.markhneedham.com\/blog\/\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/mark-needham\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python: Look ahead multiple elements in an iterator\/generator - Web Code Geeks - 2026","description":"As part of the BBC live text scraping code I\u2019ve been working on I needed to take an iterator of raw events created by a generator and transform this into","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:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/","og_locale":"en_US","og_type":"article","og_title":"Python: Look ahead multiple elements in an iterator\/generator - Web Code Geeks - 2026","og_description":"As part of the BBC live text scraping code I\u2019ve been working on I needed to take an iterator of raw events created by a generator and transform this into","og_url":"https:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_published_time":"2015-06-10T09:15:59+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","type":"image\/jpeg"}],"author":"Mark Needham","twitter_card":"summary_large_image","twitter_creator":"@webcodegeeks","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Mark Needham","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/"},"author":{"name":"Mark Needham","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/848a54e2ee724e46069ce36c2e52e98e"},"headline":"Python: Look ahead multiple elements in an iterator\/generator","datePublished":"2015-06-10T09:15:59+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/"},"wordCount":244,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/","url":"https:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/","name":"Python: Look ahead multiple elements in an iterator\/generator - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","datePublished":"2015-06-10T09:15:59+00:00","description":"As part of the BBC live text scraping code I\u2019ve been working on I needed to take an iterator of raw events created by a generator and transform this into","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/python\/python-look-ahead-multiple-elements-iteratorgenerator\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Python","item":"https:\/\/www.webcodegeeks.com\/category\/python\/"},{"@type":"ListItem","position":3,"name":"Python: Look ahead multiple elements in an iterator\/generator"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/848a54e2ee724e46069ce36c2e52e98e","name":"Mark Needham","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5489baed26ce2d932bf951ecfb47afe80bec45d3648c23521d87c83b8f1c3ea9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5489baed26ce2d932bf951ecfb47afe80bec45d3648c23521d87c83b8f1c3ea9?s=96&d=mm&r=g","caption":"Mark Needham"},"sameAs":["http:\/\/www.markhneedham.com\/blog\/"],"url":"https:\/\/www.webcodegeeks.com\/author\/mark-needham\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/5122","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/48"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=5122"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/5122\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/1651"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=5122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=5122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=5122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}