Question: I have some JSON output, for example:

```
«somethings»:
{
  "id": 1, 
  "param1": 11,
  "param2": 12
},
{
    "id": 2,
    "param1": 21,
    "param2": 22
}  

```

I want to show only param1 for each "id". I can do it for use circle for:

```
for i in range(0, 50):
    print parsed_string["somethings"][i]["param1"]

```

but I don't now how many ids i can get.

Answer: 
In the JSON it's just an array of objects (and Python list once parsed), so you can iterate over all of them like so:

```
for obj in parsed_string["somethings"]:
    print(obj["param1"])

```
If you need to display key-value, use following code

```
import json as json

json_string = '[{"id":"A 0","param1":"SOME DATA 1","param2":"SOME DATA 2"},' \
              '{"id":"A 1","param1":"SOME DATA 2","param2":"SOME DATA 2"},' \
              '{"id":"A 2","param1":"SOME DATA 2","param2":"SOME DATA 2"}]'

json_data = json.loads(json_string)
for d in json_data:
    for key, value in d.iteritems():
        if (key in ("param1")):  # ("id", "param1")
            print key, value

```