Python - Using min() to find min value in JSON object?
<p>So I have a geojson object that has:</p>

<pre><code>"features" : [{"properties": {"rank": 10}},{"properties": {"rank": 2}}]
</code></pre>

<p>and so on. I want to find the minimum rank and use the <a href="https://docs.python.org/2/library/functions.html#min" rel="nofollow">min</a> method. So I tried something like this: </p>

<pre><code>features = geojson["features"]
min(features["properties"]["rank"])
</code></pre>

<p>and then: </p>

<pre><code>features = geojosn["features"]["properties"]["rank"]
min(features)
</code></pre>

<p>and got this on both: </p>

<blockquote>
  <p>TypeError: List indices must be integers of slices, not str </p>
</blockquote>

<p>What am I doing wrong? Any help would be greatly appreciated, thanks!!!</p>