title: Storing JSON data as columns in Azure table storage
body: <p>How do a format my json data and/or change my function so that it gets stored as columns in Azure table storage?  </p>
  
  <p>I am sending a json string to the IoT hub: </p>
  
  <pre><code>{"ts":"2017-03-31T02:14:36.426Z","timeToConnect":"78","batLevel":"83.52","vbat":"3.94"}
  </code></pre>
  
  <p>I run the sample function (in the Azure Function App module) to transfer the data from the IoT hub into my storage account: </p>
  
  <pre><code>    'use strict';
  
  // This function is triggered each time a message is revieved in the IoTHub.
  // The message payload is persisted in an Azure Storage Table
  var moment = require('moment');
  
  module.exports = function (context, iotHubMessage) {
     context.log('Message received: ' + JSON.stringify(iotHubMessage));
     context.bindings.deviceData = {
     "partitionKey": moment.utc().format('YYYYMMDD'),
        "rowKey": moment.utc().format('hhmmss') + process.hrtime()[1] + '',
        "message": JSON.stringify(iotHubMessage)
     };
     context.done();
  };
  </code></pre>
  
  <p>But in my storage table, it shows up as a single string rather than getting split into columns (as seen in the storage explorer.  </p>
  
  <p><a href="https://i.stack.imgur.com/rPhCS.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/rPhCS.jpg" alt="Azure storage explorer"></a></p>
  
  <p>How do I get it into columns for ts, timeToConnect, batLevel, and vbat?  </p>