title: Create json from xcom airflow task instance data
body: <p>I have two tasks in the airflow dag. The first task hits the POST URL and the result of it becomes the param of second task. I am able to hit the first URL and send it to another task. The problem is, I am not able to create the correct json out of second one.</p>
  <pre><code>
  def create_dag(dag_id,
                 schedule,
                 default_args):
      def task1(**kwargs):
          res = requests.post('some url')
          return res
  
      def task2(**kwargs):
          ti = kwargs['ti']
          v1 = ti.xcom_pull(key=None, task_ids='taks1')
          for rec in v1:
              decode = rec.decode(&quot;utf-8&quot;)
              logger.error(decode)
  </code></pre>
  <p>The first task returns the json:</p>
  <pre><code>{
      &quot;data&quot;: [
          {
              &quot;id&quot;: 36,
              &quot;idPercent&quot;: 12.67605633802817,
              &quot;idPerson&quot;: [
                  &quot;Washburn&quot;
              ]
          },
          {
              &quot;id&quot;: 37,
              &quot;idPercent&quot;: 13.028169014084508,
              &quot;idPerson&quot;: [
                  &quot;Nicole&quot;
              ]
          }
      ]
  }
  </code></pre>
  <p>And the rec.decode(&quot;utf-8&quot;) print me the same. I start getting error if i do json.loads on rec.decode(&quot;utf-8&quot;). I want to create the correct json and then for each array value of the data i want to send a POST request.</p>
  <p>I want something like:</p>
  <pre><code>for rec in v1['data']:
       requests.post(url, rec)
  
  </code></pre>
  <p>But i am not able to create the json and extract the data from it.</p>