title: Load variable from JSON file to Python
body: <p>I have a JSON that is downloaded from Google BigQuery and has only one value. How do I get this variable to be represented in my Python Script. Thank you for the help!</p>
  
  <pre><code>import smtplib
  import os
  
  from slacker import Slacker
  
  def post_slack():
      """Post slack message."""
      try:
          slack = Slacker(token)
  
          obj = slack.chat.post_message(
              channel='#dataworksapp',
              as_user=True,
              attachments=[
          {
              "fallback": "Required plain-text summary of the attachment.",
              "color": "#36a64f",
              "pretext": "Optional text that appears above the attachment block",
              "author_name": "Data Works",
              "author_link": "http://flickr.com/bobby/",
              "author_icon": "http://flickr.com/icons/bobby.jpg",
              "title": "BlueBox Weekly Information",
              "title_link": "https://console.cloud.google.com/storage/browser/firebase_results/?project=dataworks-356fa",
              "text": "Optional text that appears within the attachment",
              "fields": [
                  {
                      "title": "BlueBox Devices Connected",
                      "value": "High",
                      "short": 'true'
                  },
                  {
                      "title": "BlueBox Connection Time",
                      "value": "High",
                      "short": 'true'
                  }
              ],
              "image_url": "http://my-website.com/path/to/image.jpg",
              "thumb_url": "http://example.com/path/to/thumb.png",
              "footer": "Slack API",
              "footer_icon": "https://platform.slack-edge.com/img/default_application_icon.png",
              "ts": 123456789
          }])
          print obj.successful, obj.__dict__['body']['channel'], obj.__dict__[
              'body']['ts']
      except KeyError, ex:
          print 'Environment variable %s not set.' % str(ex)
  
  if __name__ == '__main__':
      post_slack()
  </code></pre>
  
  <p>This is the code I have. I would need the "value" part in the attachments to be the variable uploaded from JSON. </p>