title: how to refer variables in JSON file?
body: <p>I have following JSON data which I'm trying to use in python.</p>
  
  <pre><code>{"tag": "currency",
           "patterns": ["What is dollar rate in PKR", "Convert Dollar to PKR", "Convert USD to PKR", "What is Euro rate", "Convert Euro to PKR", "GBP rate in PKR", "British Pound Rate in PKR"],
           "currencies": ["Dollar", "USD", "US Dollar", "Euro", "Pound", "British Pound", "GBP"],
           "responses": [""],
  
          "context_filter": ""
          },
  </code></pre>
  
  <p>Also below is my python script:</p>
  
  <pre><code>  if i['tag'] == 'currency':
       if i['currencies'] == 'USD' :
          engine.say(data.USD_PKR)
       if i['currencies'] == 'pound':
          engine.say('I can\'t tell about Pound Yet')
  </code></pre>
  
  <p>What I want to do is making this script check two conditions:</p>
  
  <p><strong>1:</strong> It checks if the tag is matched (<em>i.e Currency</em>)</p>
  
  <p><strong>2:</strong> It checks the currency names from currency names. </p>
  
  <p>My python chatbot reads the data from this json file. I want the chatbot to tell me currency rates to 'PKR' which is currency of my country.
  the 'patterns' are basically the questions which user will ask from the chatbot.
  I can write code to get currency rates of above mentioned currencies</p>
  
  <p><strong>But</strong> I can't figure out how to write a code so that it tells me rate of only that currency which I asked it in command line. 
  For example:</p>
  
  <p><strong>Me:</strong> What is USD rate?</p>
  
  <p><strong>Bot:</strong> 105.4 PKR</p>
  
  <p><strong>Me:</strong> What is GBP rate?</p>
  
  <p><strong>Bot:</strong> 110.66 PKR</p>
  
  <p><strong>Me:</strong> What is Euro rate?</p>
  
  <p><strong>Bot:</strong> 125.3 PKR</p>
  
  <p>I can get the conversion rates one by one, by scrapping a website and printing the results to command line. So that part is done.
  I need to modify the Questions data so whenever a currency is mentioned in question, python script finds the rate for that particular currency which is mentioned in the Question.
  Hope I have explained it correctly.</p>
  
  <p>Any suggestions?</p>