Number in JSON only getting 5 decimals

I am returning a JSON and one of the values contains a number with 14 decimals. However, when I try to use this number, for example, display the number in a label, it will return on 5 decimals.

How to get all 14 decimals?

Can You Show Your JSON Data And What You Have Tried

Sure



The value that is shown in lbl_ip label has only 5 decimals

If You Provide Text OF JSON So We Can Try It And Give You Some Solution

{
"ip": "8.8.8.8",
"type": "ipv4",
"continent_code": "NA",
"continent_name": "North America",
"country_code": "US",
"country_name": "United States",
"region_code": "CA",
"region_name": "California",
"city": "Ashburn",
"zip": "20149",
"latitude": 37.38801956176758,
"longitude": -122.07431030273438,
"location": {
"geoname_id": 5375480,
"capital": "Washington D.C.",
"languages": [
{
"code": "en",
"name": "English",
"native": "English"
}
],
"country_flag_emoji": "🇺🇸",
"country_flag_emoji_unicode": "U+1F1FA U+1F1F8",
"calling_code": "1",
"is_eu": false
},
"time_zone": {
"id": "America/Los_Angeles",
"current_time": "2020-11-16T11:02:30-08:00",
"gmt_offset": -28800,
"code": "PST",
"is_daylight_saving": false
},
"currency": "USD",
"connection": {
"asn": 15169,
"isp": "Google LLC"
},
"as": "AS15169 Google LLC",
"asname": "GOOGLE",
"continent": "North America",
"continentCode": "NA",
"country": "United States",
"countryCode": "US",
"district": "",
"hosting": true,
"isp": "Google LLC",
"lat": 39.03,
"lon": -77.5,
"mobile": false,
"org": "Google Public DNS",
"proxy": false,
"query": "8.8.8.8",
"region": "VA",
"regionName": "Virginia",
"reverse": "dns.google",
"status": "success",
"timezone": "America/New_York"
}

Here Is your Solution

blocks

I Fond When We Decode JSON Text Using Web Component Then It’s Short It

Use JSON Tool For Better Result

1 Like

Found it. Thanks

Quick question, how to get the value in a sub JSON array using the JSONTools extension?

blocks

However, using dictionaries is always better :slightly_smiling_face::

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.