title: python-select unique key values from json object
body: <p>I have a <strong>json</strong> response:</p>
  
  <pre><code>{
    "data": [
    {
       "id": "1",
       "name": "Tom",
       "age": "24",
    },
    {
       "id": "2",
       "name": "Nick",
       "age": "45",
   },
   {
       "id": "3",
       "name": "Harry",
       "age": "18",
   },
   {
       "id": "1",
       "name": "Tom",
       "age": "29",
   }
  ],
   "count": 4
  }
  </code></pre>
  
  <p>And i want <strong>output</strong> to be like this:</p>
  
  <pre><code>output[
  {
     "id": "1",
     "name": "Tom",
     "age": "24",
  },
  {
     "id": "2",
     "name": "Nick",
     "age": "45",
  },
  {
     "id": "3",
     "name": "Harry",
     "age": "18",
  }
  ]
  </code></pre>
  
  <p>What I want is to fetch all dictionary objects having unique names.
  I know how to fetch unique names, but I want to fetch <code>id</code> and <code>age</code> too. 
  There are two dictionary objects corresponding to <code>name</code> <code>Tom</code>. I want to keep one in my output.</p>
  
  <p>This is the <strong>working code to fetch uniquenames</strong>:</p>
  
  <pre><code>size=len(data["data"])
  uniqueNames = [];
  for i in range(0,size,1):  
      if(data["data"][i]["name"] not in uniqueNames):
           uniqueNames.append(data["data"][i]["name"]); 
  print uniqueNames
  </code></pre>