JSON Tools Extension by LukeGackle

Hi everybody need help with JSON
I’m new, please help me
I have this answer

{
“jsonrpc”: “2.0”,
“result”: [
{
“hostid”: “10402”,
“proxy_hostid”: “0”,
“host”: “AE3649PA”,
“status”: “0”,
“disable_until”: “0”,
“error”: “”,
“available”: “1”,
“errors_from”: “0”,
“lastaccess”: “0”,
“ipmi_authtype”: “-1”,
“ipmi_privilege”: “2”,
“ipmi_username”: “”,
“ipmi_password”: “”,
“ipmi_disable_until”: “0”,
“ipmi_available”: “0”,
“snmp_disable_until”: “0”,
“snmp_available”: “0”,
“maintenanceid”: “0”,
“maintenance_status”: “0”,
“maintenance_type”: “0”,
“maintenance_from”: “0”,
“ipmi_errors_from”: “0”,
“snmp_errors_from”: “0”,
“ipmi_error”: “”,
“snmp_error”: “”,
“jmx_disable_until”: “0”,
“jmx_available”: “0”,
“jmx_errors_from”: “0”,
“jmx_error”: “”,
“name”: “AE3649PA”,
“flags”: “0”,
“templateid”: “0”,
“description”: “”,
“tls_connect”: “1”,
“tls_accept”: “1”,
“tls_issuer”: “”,
“tls_subject”: “”,
“tls_psk_identity”: “”,
“tls_psk”: “”,
“proxy_address”: “”,
“auto_compress”: “1”,
“discover”: “0”,
“inventory_mode”: “1”
}
],
“id”: 1
}

JSON Tools Extension by LukeGackle

Get “hostid”?

1 Like

To work with JSON, you need to refer to the tutorials in the community and other source.

I took your JSON text and assigned it to a variable in the app then I convert the JSON text to an object.

I then extracted the hostid from the object using object components and list components because your JSON has a list inside the object.

This is the outcome
image

This is the code I used

I also changed the category of you post from Made with Thunkable to Thunkable Discuss

3 Likes

Thanks for the help. But I do not understand
Here is my code

1 Like

This is not Thunkable X.

1 Like

The fact is that I don’t get the code like this

Through Postman, I get the following text

In App Inventor, this is the code

image

1 Like

This is a thunkable forum, not app inventor. You are spamming the forum. Please do not post here.

2 Likes

I kind of talk on the topic

I used your text that you shared and provided you with Thunkable X blocks that works. I even shared the screen display.

Of course, if you use it through a Web API you will get the green response block and convert it to object and then extract the “hostid” from it which is the same steps I showed.

Yes, but you should post questions that you have when using app inventor in the app inventor forum.

2 Likes

WHAT!
Please do NOT talk like that.
this is not the way we talk here.
Here is a link of the rules please Read Them.
https://community.thunkable.com/guidelines

2 Likes

Moderators, I’ve flagged that post. Could you please delete it from your end?

1 Like

This is rude and should be removed.

2 Likes