title: how to format JSON to fit the schema for EON Pubnub charting Library
body: <p>I am struggling with this for quite some time now, can someone explain a solution to this problem</p>
  
  <pre><code>if i = {'x': 123, 'y': 456} {'x': 675, 'y': 098}
  </code></pre>
  
  <p>turn it into </p>
  
  <pre><code>message: {
        columns: [
          ["x": 123, "y": "456"],
          ["x": 675, "y": 098]
        ]
  </code></pre>
  
  <p><strong>More Insights:</strong></p>
  
  <p>I have the following Data structure </p>
  
  <pre><code>[&lt;OldSample {u'counter_name': u'cpu_util', u'user_id': u'id', u'resource_id': u'id', u'timestamp': u'2015-06-30T15:53:55', u'counter_volume': 0.043}]
  </code></pre>
  
  <p>I need to make it something like this to put in EON pubnub charting libaray (see link: <a href="http://www.pubnub.com/developers/eon/chart/spline/" rel="nofollow">http://www.pubnub.com/developers/eon/chart/spline/</a>)</p>
  
  <pre><code>message: {
        columns: [
          ["y": 0.043, "x": "2015-06-30T15:53:55"],
          ["y": 0.045, "x": "2015-06-30T15:53:55"]
        ]
  </code></pre>
  
  <p>Now I have the following code </p>
  
  <pre><code>def get_clean_Json(data):
    for each in data:
      timestamp = each.timestamp
      volume =  each.counter_volume
      i = {'x': timestamp, 'y': volume}
      print i
  </code></pre>
  
  <p>Which returns results like this</p>
  
  <pre><code>{'x': 123, 'y': 456} {'x': 675, 'y': 098}
  </code></pre>
  
  <p>and I am stuck here, no matter what I do I get errors</p>