I want to get all 'name' from this json and separate by comma
{
"example": [
{
"id": 1,
"name": "blah"
},
{
"id": 2,
"name": "nah"
},
{
"id": 5,
"name": "krah",
},
{
"id": 10,
"name": "ugh"
}
],
}
when im trying to:
example = r_json['example']['name']
print(example)
it returns me:
example = r_json['example']['name']
TypeError: list indices must be integers or slices, not str
output i want is something like:
blah, nah, krah, ugh