title: How to pass variable to JSON, for python?
body: <p>I am new in work with JSON, so sorry in advance for the stupid question.</p>
  
  <p>I want to write JSON with the variable in the value field. It looks like this:</p>
  
  <pre><code>def print_json(user_name):
      opened_json = open('way/to/json/file')
      tmp = json.load(opened_json)
  
      res = tmp(['path_to_folder'](user_name))
      print(res)
  
  def main(user_name):
      print_json(user_name)
  
  
  main('user')
  </code></pre>
  
  <p>It is JSON:</p>
  
  <pre><code>{"path_to_folder": "/Users/" + user_name + "/my_folder/"}
  </code></pre>
  
  <p>Awaiting for that output:</p>
  
  <pre><code>/Users/user/my_folder/
  </code></pre>
  
  <p>Please, tell me if any solution here exists.</p>
  
  <p>Thanks in advance!</p>
  
  <p><strong>EDIT: My problem, that I can't add variable to JSON correctly. It marked red. Wrong syntax, when I try to concat.</strong> </p>