title: Reference to element in JSON
body: <p>Let's say I have a simple json variable and I can access it's values like this:</p>
  <pre><code>import json
  
  # some JSON:
  x =  '{ &quot;name&quot;:&quot;John&quot;, &quot;age&quot;:30, &quot;city&quot;:&quot;New York&quot;, &quot;ID_info&quot;:{ &quot;first_name&quot;:&quot;John&quot;, &quot;year&quot;:1995}}'
  
  # parse x:
  y = json.loads(x)
  
  # the result is a Python dictionary:
  print(y[&quot;age&quot;]) #prints 30
  print(y[&quot;ID_info&quot;][&quot;first_name&quot;]) #prints John
  </code></pre>
  <p>Is there a way to replace the value in <code>&quot;first_name&quot;</code> so that it finds it in <code>&quot;name&quot;</code>?</p>
  <p>I would expect something like:</p>
  <pre><code>import json
  
  # some JSON:
  x =  '{ &quot;name&quot;:&quot;John&quot;, &quot;age&quot;:30, &quot;city&quot;:&quot;New York&quot;, &quot;ID_info&quot;:{ &quot;first_name&quot;:$Ref(&quot;name&quot;), &quot;year&quot;:1995}}'
  
  # parse x:
  y = json.loads(x)
  
  # the result is a Python dictionary:
  print(y[&quot;age&quot;]) #prints 30
  print(y[&quot;ID_info&quot;][&quot;first_name&quot;]) # I'd like it to print &quot;John&quot;
  </code></pre>
  <p>PS this is a simple example IRL I have nested jsons I want to simplify :)</p>