I want to get sum of count Below is my json:
json_data={
"note":abbcccc,
"comments":
[{"count":100,"name"=leven},{"count":120,"name"=sam}]
}
How do I get the sum of all counts (100+120)
I can get indivdual like this:
data=json.loads(json_data)
count=data["comments"][0]["count"]
But stuck on "How to loop though it"