title: How to find the longest full name of a person in a json file?
body: <p>I'm working on a json file, with the data given as seen below:</p>
  <pre><code>{&quot;id&quot;:&quot;Q47786519&quot;,&quot;name&quot;:&quot;Ulrik Luft&quot;,&quot;l&quot;:&quot;-1684&quot;,&quot;p&quot;:&quot;&quot;,&quot;g&quot;:&quot;m&quot;,&quot;y&quot;:1664,&quot;o&quot;:[&quot;Q12323666&quot;]}
  </code></pre>
  <p>What I want to do is to write a code, that gives me the longest full name of a person in my json file. So far I wrote the following:</p>
  <pre><code>file = open(&quot;dbl.json&quot;)
  dbl = json.load(file)
  
  def longest_name_born(persons):
  
      longest_name = persons[0]
      for person in persons:
              if len(person['name']) &gt; len(longest_name['name']):
                  longest_name = person
      return longest_name['p']
  
  print(longest_name_born(dbl))
  </code></pre>
  <p>But it only gives me the longest single name <code>(Augustenborg</code>) in the file and not the longest full name. Can some help me/ give me a hint?</p>