r = '{"available_sizes":[{"id":104682,"name":"40","preorder_only":false},{"id":104683,"name":"41","preorder_only":false},{"id":104684,"name":"42","preorder_only":false},{"id":104685,"name":"43","preorder_only":false},{"id":104687,"name":"45","preorder_only":false}]}'
data = json.loads(r)
for element in data:
for value in data['available_sizes']:
print(value['name'])
At the moment this prints out the following:
40
41
42
43
45
How would I then use this data as a string? Below is the desired output.
Available sizes are 40, 41, 41, 43, 45