title: Jmeter JSON Extractor with one node empty
body: <p>I have a JSON Response like this </p>
  
  <pre><code>`{
     "data": [
        {
           "id": "1",
            "type": "status",
           "created_time": "2010-08-02T22:27:44+0000",
           "updated_time": "2010-08-02T22:27:44+0000"
        },
        {
           "id": "2",
           "message": "JSON is much easier and better than XML",
           "created_time": "2010-08-02T25:27:44+0000",
           "updated_time": "2010-08-02T25:27:44+0000"
        },
        {
           "id": "3",
           "created_time": "2010-08-02T25:27:44+0000",
           "updated_time": "2010-08-02T25:27:44+0000"
        },
        {
           "id": "4",
           "message": "JSON is much easier and better than XML",
           "created_time": "2010-08-02T25:27:44+0000",
           "updated_time": "2010-08-02T25:27:44+0000"
        },
        {
           "id": "5",
           "created_time": "2010-08-02T25:27:44+0000",
           "updated_time": "2010-08-02T25:27:44+0000"
        },
        {
           "id": "6",
           "message": "JSON is much easier and better than XML",
           "created_time": "2010-08-02T25:27:44+0000",
           "updated_time": "2010-08-02T25:27:44+0000"
        }
     ]
  }`
  </code></pre>
  
  <p>Now as you can see that node 1, 3 and 5 are missing the message field
  I am extracting the values for id, message, created_time and updated_time using json extractor with match no -1
  values are extracted correctly i am them writing them in to the CSV file inside for loop using the ID_matchNr for maximum number But the problem I am facing is that since we don't have any value in node 1 but when I write it write the message value of node 2.</p>
  
  <p>How can I write null for message for node 1, 3 &amp; 5?</p>
  
  <p>One of the option i thought was add a dummy sampler and use the same payload and extract the message value using the conditional json extractor based on extracted ID from the 1st sampler response.</p>
  
  <p>One of the other option I thought was to use the foreachcontroller and use the sampler to write to file this was I may be able to use the corresponding message value of id but this will again have another beanshell sampler to write to file.</p>
  
  <p>But I was hoping to have simpler solution rather than making another sampler request</p>
  
  <p>This is how I want the CSV File data to look like:</p>
  
  <p><a href="https://i.stack.imgur.com/0dsio.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0dsio.png" alt="enter image description here"></a></p>