title: Config Parser Python - How to read from json file?
body: <p>I have created a <code>profile.json</code> file in the same folder as my <code>script/.py</code> is. It looks something like:</p>
  
  <pre><code>{
      "name": "",
      "lastname": "",
      "age": "",
      "city": "",
  }
  </code></pre>
  
  <p>I'm looking to insert it into my script that got headers of:</p>
  
  <pre><code>"info": {
      "given_name": "",
      "given_Lastname": "",
      "given_age": "",
      "given_city": ""
  }
  </code></pre>
  
  <p>I'm wondering how can I make it possible to read from my <code>profile.json</code> into my script? This is my first time using this and I'm also new into Python. I feel like this could be an easy way to modify information WITHOUT having to change the code every time. </p>
  
  <p>EDIT:</p>
  
  <p>Tried to do this:</p>
  
  <p>with open('profile.json', encoding='UTF-8') as json_data:
      config = json.load(json_data)
      print(config)</p>
  
  <p>then:</p>
  
  <pre><code>"info": 
         {
           "given_name": config.given_name
         }
  </code></pre>
  
  <p>the print is saying good information but when it comes to <strong>"given_name": config.given_name</strong> then im getting a error saying </p>
  
  <p><code>AttributeError: 'dict' object has no attribute 'given_name'</code></p>