{"id":1459,"date":"2018-09-27T16:00:40","date_gmt":"2018-09-27T20:00:40","guid":{"rendered":"https:\/\/www.redline13.com\/blog\/?p=1459"},"modified":"2018-09-27T16:00:40","modified_gmt":"2018-09-27T20:00:40","slug":"jmeter-extract-and-re-use-as-variable","status":"publish","type":"post","link":"https:\/\/www.redline13.com\/blog\/2018\/09\/jmeter-extract-and-re-use-as-variable\/","title":{"rendered":"JMeter Extract and Re-use as Variable &#8211; with More Extractors"},"content":{"rendered":"<p>This is our most popular blog post and we&#8217;ve added more extractors. This post explains how to use the regular expression extractor to extract the key from the response of your first request and use the extracted key for subsequent requests. We call this JMeter Extract and re-use.<\/p>\n<p>Now you can use additional extractors, the JSON extractor and Xpath extractor. We\u2019ve added that to the end of this blog post.<\/p>\n<p>You can use the regular expression extractor to extract the key from the response of your first request and use the extracted key for subsequent requests. We call this\u00a0JMeter Extract and re-use. Here are the steps:<\/p>\n<ol>\n<li>Right click on the first request and add post processor: Regular Expression Extractor.\n<ul>\n<li><a href=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/Screen-Shot-2016-01-19-at-1.11.05-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1461\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/Screen-Shot-2016-01-19-at-1.11.05-PM.png\" alt=\"Screen Shot of Regular Expression Extractor\" width=\"428\" height=\"254\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/Screen-Shot-2016-01-19-at-1.11.05-PM.png 1604w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/Screen-Shot-2016-01-19-at-1.11.05-PM-300x178.png 300w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/Screen-Shot-2016-01-19-at-1.11.05-PM-1024x608.png 1024w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/Screen-Shot-2016-01-19-at-1.11.05-PM-768x456.png 768w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/Screen-Shot-2016-01-19-at-1.11.05-PM-1536x912.png 1536w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/Screen-Shot-2016-01-19-at-1.11.05-PM-1568x931.png 1568w\" sizes=\"auto, (max-width: 428px) 100vw, 428px\" \/><\/a><\/li>\n<\/ul>\n<\/li>\n<li>Create your regular expression and provide values in other required fields. Please refer to JMeter component reference for more details.<\/li>\n<li>The extracted value will be saved in the variable given as reference name.<\/li>\n<li>You can use this variable in subsequent requests.<\/li>\n<\/ol>\n<h3>Example Test Plan &#8211; JMeter Extract and Re-use<\/h3>\n<p>We are using <a href=\"http:\/\/www.openweathermap.org\/\">OpenWeather API<\/a> for example and will extract the cityid<\/p>\n<ol>\n<li>Let\u2019s suppose \u201cCurrent weather by city\u201d is your first request. In response of this request, it returns the city id. I have added a regular expression extractor which will extract the city id and extracted value will save in \u201ccityid\u201d variable name.\n<ul>\n<li><a href=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/extractby.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1462\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/extractby.png\" alt=\"Screenshot of regular expression extractor\" width=\"490\" height=\"112\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/extractby.png 900w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/extractby-300x68.png 300w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/extractby-768x175.png 768w\" sizes=\"auto, (max-width: 490px) 100vw, 490px\" \/><\/a><\/li>\n<\/ul>\n<\/li>\n<li>\u201ccityid\u201d variable is sent in the subsequent requests. For example, it is used in \u201cCurrent weather by city ID\u201d request.\n<ul>\n<li><a href=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/usingcityid.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1463\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/usingcityid.png\" alt=\"Screenshot example of variable used in subsequent requests\" width=\"452\" height=\"451\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/usingcityid.png 1912w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/usingcityid-300x300.png 300w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/usingcityid-1024x1024.png 1024w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/usingcityid-150x150.png 150w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/usingcityid-768x767.png 768w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/usingcityid-1536x1534.png 1536w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/usingcityid-1568x1566.png 1568w\" sizes=\"auto, (max-width: 452px) 100vw, 452px\" \/><\/a><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>We&#8217;ve now done JMeter extract and reuse.<\/p>\n<p>You can run a\u00a0<a href=\"https:\/\/www.redline13.com\/blog\/2017\/02\/jmeter\/\">JMeter Load Test<\/a>\u00a0with your JMX script of any mobile application, web application, or API on <a href=\"http:\/\/www.redline13.com\">RedLine13<\/a>. Here are\u00a0<a href=\"https:\/\/www..com\/LoadTest\/View\/23024\">results<\/a>\u00a0to check out.<\/p>\n<p>Or go and try your own <a href=\"https:\/\/www.redline13.com\/Service\">load test<\/a>.<\/p>\n<h3>More Extractors &#8211; JMeter Extract and Re-use<\/h3>\n<p>This new section will explain how you can also use a JSON extractor or Xpath extractor to extract the key from the response of your first request and use the extracted key for subsequent requests. This is also part of JMeter Extract and re-use.<\/p>\n<h3>Extract using JSON Extractor<\/h3>\n<p>JSON\u00a0is an extremely simple data format, which has overtaken\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/XML\">XML<\/a>\u00a0in popularity. An increasing number of\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/Representational_state_transfer\">REST APIs<\/a>\u00a0and servers are using JSON as their primary data exchange format. Since JMeter 3.0, it is far easier to extract data from JSON responses using the JSON post processor extractor. The JSON post processor enables you extract data from responses using JSON-PATH syntax. This post processor is very similar to Regular expression extractor. It must be placed as a child of HTTP Sampler or any other sampler that has responses. It will allow you to extract text content in a very easy way. See <a href=\"http:\/\/goessner.net\/articles\/JsonPath\/\" target=\"_blank\" rel=\"noopener noreferrer\">JSONPath syntax<\/a> for more details.<\/p>\n<p>To demonstrate the use of the JSON post processor, let&#8217;s use the <a href=\"https:\/\/jsonplaceholder.typicode.com\/todos\/1\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/jsonplaceholder.typicode.com\/todos\/1<\/a> rest service, which allows you to demo sending requests and getting responses.<\/p>\n<p>If you click on this link or copy paste into a browser, you will see the response. The response is in JSON format:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">{\n  \"userId\": 1,\n  \"id\": 1,\n  \"title\": \"delectus aut autem\",\n  \"completed\": false\n}<\/pre>\n<p>From the above response, you can extract <u>userId<\/u>, <u>id<\/u> and <u>title<\/u>, completely using the JSON path and JSON post processor.<br \/>\nFollow the steps below to extract the values.<\/p>\n<p>Add a HTTP Request sampler with the following parameters:<\/p>\n<p><b>Protocol:<\/b> https<br \/>\n<b>Server Name or IP:<\/b> jsonplaceholder.typicode.com<br \/>\n<b>Method:<\/b> GET<br \/>\n<b>Path:<\/b> \/todos\/1<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-5209\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/word-image.png\" alt=\"Screenshot of example getting a variable\" width=\"778\" height=\"303\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/word-image.png 778w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/word-image-300x117.png 300w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/word-image-768x299.png 768w\" sizes=\"auto, (max-width: 778px) 100vw, 778px\" \/><\/p>\n<p>Add a JSON post processor as a child of HTTP Request sampler:<\/p>\n<p><b>Names of created variables:<\/b> userID<br \/>\n<b>JSON Path Expression:<\/b> $.userId<br \/>\n<b>Match no:<\/b> 1<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-5210\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/word-image-1.png\" alt=\"Screenshot of JSON extractor\" width=\"786\" height=\"271\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/word-image-1.png 786w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/word-image-1-300x103.png 300w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/word-image-1-768x265.png 768w\" sizes=\"auto, (max-width: 786px) 100vw, 786px\" \/><\/p>\n<p>The above JSON extractor extracts <u>userId<\/u> and stores in <u>userID<\/u>. You can use <u>${userID}<\/u> to reuse this variable.<\/p>\n<p>To know more about writing JSON path expressions please refer to <a href=\"http:\/\/goessner.net\/articles\/JsonPath\/index.html#e2\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/goessner.net\/articles\/JSONPath\/index.html#e2<\/a><\/p>\n<h3><strong>Extract using XPath Extractor<\/strong><\/h3>\n<p>XPath is defined as\u00a0<strong>XML path<\/strong>.\u00a0<strong>It is a syntax or language for finding any element on the web page using an XML path expression<\/strong>. XPath is used to find the location of any element on a webpage using the HTML DOM structure. To demonstrate the use of the XPath extractor, let us assume the following response for one of my HTTP requests in JMeter:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&lt;div class=\"container\"&gt;\n&lt;h2&gt;Choose your departure city:&lt;\/h2&gt;\n&lt;form action=\"reserve.php\" method=\"post\"&gt;\n&lt;select name=\"fromPort\" class=\"form-inline\"&gt;\n&lt;option value=\"Paris\"&gt;Paris&lt;\/option&gt;\n&lt;option value=\"Philadelphia\"&gt;Philadelphia&lt;\/option&gt;\n&lt;option value=\"Boston\"&gt;Boston&lt;\/option&gt;\n&lt;option value=\"Portland\"&gt;Portland&lt;\/option&gt;\n&lt;option value=\"San Diego\"&gt;San Diego&lt;\/option&gt;\n&lt;option value=\"Mexico City\"&gt;Mexico City&lt;\/option&gt;\n&lt;option value=\"S\u00e3o Paolo\"&gt;S\u00e3o Paolo&lt;\/option&gt;\n&lt;\/select&gt;\n&lt;p&gt;\n&lt;h2&gt;Choose your destination city:&lt;\/h2&gt;\n&lt;select name=\"toPort\" class=\"form-inline\"&gt;\n&lt;option value=\"Buenos Aires\"&gt;Buenos Aires&lt;\/option&gt;\n&lt;option value=\"Rome\"&gt;Rome&lt;\/option&gt;\n&lt;option value=\"London\"&gt;London&lt;\/option&gt;\n&lt;option value=\"Berlin\"&gt;Berlin&lt;\/option&gt;\n&lt;option value=\"New York\"&gt;New York&lt;\/option&gt;\n&lt;option value=\"Dublin\"&gt;Dublin&lt;\/option&gt;\n&lt;option value=\"Cairo\"&gt;Cairo&lt;\/option&gt;\n&lt;\/select&gt;<\/pre>\n<p>We can extract <u>fromPort<\/u> values and <u>toPort<\/u> values into two different variables and then pass it on to the next request. If you build a regex expression (<strong>value=&#8221;(.+?)&#8221;&gt;<\/strong>), it captures all the values of fromPort and toPort in a single array. It is very difficult to extract such values using Regular expressions. You can use XPATH extractor to extract them instead.<\/p>\n<p>To extract\u00a0a random option value for <u>fromPort<\/u>,\u00a0you can use\u00a0<strong>\/\/select[@name=&#8217;fromPort&#8217;]\/*<\/strong>\u00a0in the <u>Xpath<\/u> field and\u00a0set <u>Match No.<\/u>\u00a0to 0.<\/p>\n<p>To extract\u00a0<u>toPort<\/u>,\u00a0you can use\u00a0<strong>\/\/select[@name=&#8217;fromPort&#8217;]\/*<\/strong>\u00a0in the <u>Xpath<\/u> field and\u00a0set <u>Match No.<\/u>\u00a0to 0.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-5211\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/https-i-stack-imgur-com-b1cib-png.png\" alt=\"screenshot of XPath extractor\" width=\"1352\" height=\"354\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/https-i-stack-imgur-com-b1cib-png.png 1352w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/https-i-stack-imgur-com-b1cib-png-300x79.png 300w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/https-i-stack-imgur-com-b1cib-png-1024x268.png 1024w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/https-i-stack-imgur-com-b1cib-png-768x201.png 768w\" sizes=\"auto, (max-width: 1352px) 100vw, 1352px\" \/><\/p>\n<p>You can run a\u00a0<a href=\"https:\/\/www.redline13.com\/blog\/2017\/02\/jmeter\/\">JMeter Load Test\u00a0<\/a>with your JMX script of any mobile application, web application, or API on\u00a0<a href=\"http:\/\/www.redline13.com\/\">RedLine13<\/a>. Here are\u00a0<a href=\"https:\/\/www.redline13.com\/share\/testplan\/60146\">example results<\/a> to check out.<\/p>\n<p>Or go and try your own\u00a0<a href=\"https:\/\/www.redline13.com\/Service\">load test<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is our most popular blog post and we&#8217;ve added more extractors. This post explains how to use the regular expression extractor to extract the key from the response of your first request and use the extracted key for subsequent requests. We call this JMeter Extract and re-use. Now you can use additional extractors, the JSON extractor and Xpath extractor. We\u2019ve added that to the end of this blog post. You can use the regular expression<a class=\"more-link\" href=\"https:\/\/www.redline13.com\/blog\/2018\/09\/jmeter-extract-and-re-use-as-variable\/\">Read More &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,7],"tags":[75,202,318],"class_list":{"0":"entry","1":"post","2":"publish","3":"author-user","4":"post-1459","6":"format-standard","7":"category-blog","8":"category-jmeter","9":"post_tag-apache-jmeter","10":"post_tag-extract","11":"post_tag-load-testing"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.12 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>JMeter Extract and Re-use as Variable - with More Extractors - RedLine13<\/title>\n<meta name=\"description\" content=\"JMeter Extract and re-use is extracting from the response of your first request and using it for subsequent requests. Here&#039;s how to achieve this.\" \/>\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.redline13.com\/blog\/2018\/09\/jmeter-extract-and-re-use-as-variable\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JMeter Extract and Re-use as Variable - with More Extractors - RedLine13\" \/>\n<meta property=\"og:description\" content=\"JMeter Extract and re-use is extracting from the response of your first request and using it for subsequent requests. Here&#039;s how to achieve this.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.redline13.com\/blog\/2018\/09\/jmeter-extract-and-re-use-as-variable\/\" \/>\n<meta property=\"og:site_name\" content=\"RedLine13\" \/>\n<meta property=\"article:published_time\" content=\"2018-09-27T20:00:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/Screen-Shot-2016-01-19-at-1.11.05-PM.png\" \/>\n<meta name=\"author\" content=\"RedLine13\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"RedLine13\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.redline13.com\/blog\/2018\/09\/jmeter-extract-and-re-use-as-variable\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/2018\/09\/jmeter-extract-and-re-use-as-variable\/\"},\"author\":{\"name\":\"RedLine13\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/4acbcdcb8a9c72ec5a274e69c0ebea28\"},\"headline\":\"JMeter Extract and Re-use as Variable &#8211; with More Extractors\",\"datePublished\":\"2018-09-27T20:00:40+00:00\",\"dateModified\":\"2018-09-27T20:00:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/2018\/09\/jmeter-extract-and-re-use-as-variable\/\"},\"wordCount\":829,\"publisher\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/#organization\"},\"keywords\":[\"apache jmeter\",\"extract\",\"Load Testing\"],\"articleSection\":[\"Blog\",\"JMeter\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.redline13.com\/blog\/2018\/09\/jmeter-extract-and-re-use-as-variable\/\",\"url\":\"https:\/\/www.redline13.com\/blog\/2018\/09\/jmeter-extract-and-re-use-as-variable\/\",\"name\":\"JMeter Extract and Re-use as Variable - with More Extractors - RedLine13\",\"isPartOf\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/#website\"},\"datePublished\":\"2018-09-27T20:00:40+00:00\",\"dateModified\":\"2018-09-27T20:00:40+00:00\",\"description\":\"JMeter Extract and re-use is extracting from the response of your first request and using it for subsequent requests. Here's how to achieve this.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/2018\/09\/jmeter-extract-and-re-use-as-variable\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.redline13.com\/blog\/2018\/09\/jmeter-extract-and-re-use-as-variable\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.redline13.com\/blog\/2018\/09\/jmeter-extract-and-re-use-as-variable\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.redline13.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JMeter Extract and Re-use as Variable &#8211; with More Extractors\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#website\",\"url\":\"https:\/\/www.redline13.com\/blog\/\",\"name\":\"RedLine13\",\"description\":\"(Almost) Free Load Testing in the Cloud\",\"publisher\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.redline13.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#organization\",\"name\":\"RedLine13\",\"url\":\"https:\/\/www.redline13.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/06\/cropped-rl13-header-logo.jpg\",\"contentUrl\":\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/06\/cropped-rl13-header-logo.jpg\",\"width\":300,\"height\":68,\"caption\":\"RedLine13\"},\"image\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/4acbcdcb8a9c72ec5a274e69c0ebea28\",\"name\":\"RedLine13\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b4c9a289323b21a01c3e940f150eb9b8c542587f1abfd8f0e1cc1ffc5e475514?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b4c9a289323b21a01c3e940f150eb9b8c542587f1abfd8f0e1cc1ffc5e475514?s=96&d=mm&r=g\",\"caption\":\"RedLine13\"},\"sameAs\":[\"http:\/\/127.0.0.1\"],\"url\":\"https:\/\/www.redline13.com\/blog\/author\/user\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JMeter Extract and Re-use as Variable - with More Extractors - RedLine13","description":"JMeter Extract and re-use is extracting from the response of your first request and using it for subsequent requests. Here's how to achieve this.","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.redline13.com\/blog\/2018\/09\/jmeter-extract-and-re-use-as-variable\/","og_locale":"en_US","og_type":"article","og_title":"JMeter Extract and Re-use as Variable - with More Extractors - RedLine13","og_description":"JMeter Extract and re-use is extracting from the response of your first request and using it for subsequent requests. Here's how to achieve this.","og_url":"https:\/\/www.redline13.com\/blog\/2018\/09\/jmeter-extract-and-re-use-as-variable\/","og_site_name":"RedLine13","article_published_time":"2018-09-27T20:00:40+00:00","og_image":[{"url":"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/01\/Screen-Shot-2016-01-19-at-1.11.05-PM.png"}],"author":"RedLine13","twitter_card":"summary_large_image","twitter_misc":{"Written by":"RedLine13","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.redline13.com\/blog\/2018\/09\/jmeter-extract-and-re-use-as-variable\/#article","isPartOf":{"@id":"https:\/\/www.redline13.com\/blog\/2018\/09\/jmeter-extract-and-re-use-as-variable\/"},"author":{"name":"RedLine13","@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/4acbcdcb8a9c72ec5a274e69c0ebea28"},"headline":"JMeter Extract and Re-use as Variable &#8211; with More Extractors","datePublished":"2018-09-27T20:00:40+00:00","dateModified":"2018-09-27T20:00:40+00:00","mainEntityOfPage":{"@id":"https:\/\/www.redline13.com\/blog\/2018\/09\/jmeter-extract-and-re-use-as-variable\/"},"wordCount":829,"publisher":{"@id":"https:\/\/www.redline13.com\/blog\/#organization"},"keywords":["apache jmeter","extract","Load Testing"],"articleSection":["Blog","JMeter"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.redline13.com\/blog\/2018\/09\/jmeter-extract-and-re-use-as-variable\/","url":"https:\/\/www.redline13.com\/blog\/2018\/09\/jmeter-extract-and-re-use-as-variable\/","name":"JMeter Extract and Re-use as Variable - with More Extractors - RedLine13","isPartOf":{"@id":"https:\/\/www.redline13.com\/blog\/#website"},"datePublished":"2018-09-27T20:00:40+00:00","dateModified":"2018-09-27T20:00:40+00:00","description":"JMeter Extract and re-use is extracting from the response of your first request and using it for subsequent requests. Here's how to achieve this.","breadcrumb":{"@id":"https:\/\/www.redline13.com\/blog\/2018\/09\/jmeter-extract-and-re-use-as-variable\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.redline13.com\/blog\/2018\/09\/jmeter-extract-and-re-use-as-variable\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.redline13.com\/blog\/2018\/09\/jmeter-extract-and-re-use-as-variable\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.redline13.com\/blog\/"},{"@type":"ListItem","position":2,"name":"JMeter Extract and Re-use as Variable &#8211; with More Extractors"}]},{"@type":"WebSite","@id":"https:\/\/www.redline13.com\/blog\/#website","url":"https:\/\/www.redline13.com\/blog\/","name":"RedLine13","description":"(Almost) Free Load Testing in the Cloud","publisher":{"@id":"https:\/\/www.redline13.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.redline13.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.redline13.com\/blog\/#organization","name":"RedLine13","url":"https:\/\/www.redline13.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/06\/cropped-rl13-header-logo.jpg","contentUrl":"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/06\/cropped-rl13-header-logo.jpg","width":300,"height":68,"caption":"RedLine13"},"image":{"@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/4acbcdcb8a9c72ec5a274e69c0ebea28","name":"RedLine13","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b4c9a289323b21a01c3e940f150eb9b8c542587f1abfd8f0e1cc1ffc5e475514?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b4c9a289323b21a01c3e940f150eb9b8c542587f1abfd8f0e1cc1ffc5e475514?s=96&d=mm&r=g","caption":"RedLine13"},"sameAs":["http:\/\/127.0.0.1"],"url":"https:\/\/www.redline13.com\/blog\/author\/user\/"}]}},"_links":{"self":[{"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/posts\/1459","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/comments?post=1459"}],"version-history":[{"count":0,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/posts\/1459\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/media?parent=1459"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/categories?post=1459"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/tags?post=1459"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}