Need help with JSONTools

Hello,

I’m making an app for displaying information about an IP address and I’m using IPAPI

Everything (continent, country, region, etc.) works fine from the Web.Got Text block until I try to display ISP and Threat Level - it gives an error “No value for isp” and “No value for threat_level”

This is what I have tried so far:

And this is a screenshot of their example API Response:

Documentation

What am I doing wrong? Help is appreciated.

I don’t have much idea but logically
I say “isp” and “Threat level” is under connection and security and not direct like other

Yes, I see but I don’t know how to specify it being under “security”.

I donno make list maybe Security then Threat level

Use Dictionary

3 Likes

Like that? Because it gives No value again

read the guide and use the get value for key from dictionary blocks
Taifun

3 Likes

Please , Read soothing. Note the names of the blocks … These names represent what the blocks perform.

The guide explains everything in detail.

1 Like

I use dictionary blocks instead of JsonTools

3 Likes

I tried using this method but I get a not found

Did You check Response Content ?

That’s what it returns:

Where are “isp” and “connection” ?

1 Like

I don’t know, that’s what it gives with these blocks:

Most probably you get isp and connection when you use a payed plan not in free plan

1 Like

See here ipapi pricing

2 Likes

Friend, if the JSON return does not return “isp” or “connection” values, it will be impossible for you to get these values. See your JSON, there is no “isp” or “connection”.

With these blocks above you can get the values: city, continent code, country_name, latitude, capital …

2 Likes

never set the response content…
use your own global variable…
which btw. also helps to use Do it… remember…
use Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools
Taifun

2 Likes