title: How to sort JSON object by ID?
body: <p>I want to sort the JSON below by ID.</p>
  
  <p>This is unsuccessful:</p>
  
  <pre><code>records2 = sorted(records, key=lambda d: d["id"])
  </code></pre>
  
  <p><strong>Question</strong></p>
  
  <p>How do I sort this JSON code by ID?</p>
  
  <pre><code>{
    "item": [
      {
        "id": "2",
        "name": "name1",
        "arr": [
          "a",
          "b"
        ]
      },
      {
        "id": "1",
        "name": "name2",
        "arr": [
          "c",
          "d"
        ]
      }
    ]
  }
  </code></pre>