Ask coding questions

← Back to all posts
How do I make it so it only shows the dominant pollutant not the whole request response

I don't know how to make it display only the dominant pollutant. It's displaying all the data for the latitude, longitude right now. Help?

Answered by NoelB33 [earned 5 cycles]
View Answer

ok sooooooo hopefully this explanation is decent, pardon my grammar:
You need to go through the JSON data you get from the api 1 by 1. As you can see here you go through each part of the json file in this order, like youll see in my demo I made for you.

I made a working demo of what I think you want to do? It only works if you input an area the api has data on, like 23, 34.


@NoelB33 I already fixed the error by going to the Python Discord Server but thanks for your effort!