LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to convert JSON?

Solved!
Go to solution

I got the following API code from https://www.n2yo.com/api/.

-----------------------------------

{"info":{"satname":"SPACE STATION","satid":25544,"transactionscount":34},"positions":[{"satlatitude":17.80822298,"satlongitude":141.8774566,"sataltitude":421.54,"azimuth":100.43,"elevation":0.22,"ra":168.68966611,"dec":-9.29635148,"timestamp":1612097078,"eclipsed":true}]}

-----------------------------------

I want to take out all the node data in the json separately.(look an the picture)

koukileo_0-1612097487534.png

 

How to do?
I am no longer good at JSON, can someone help me?

thank.

0 Kudos
Message 1 of 3
(1,705 Views)
Solution
Accepted by topic author koukileo

Luckily, it is just a matter of setting up the cluster correctly.  Here are two options.  The first is using the built-in Unflatten From JSON function.  The second is using the JSON Text library from JDP Science that is available through VI Package Manager.  Personally, I prefer the JSON Text library.

EDIT: I just noticed the measurements should be a floating point instead of integers.  Again, it is just a matter of defining the clusters correctly.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 3
(1,658 Views)

Thank you so much~ let me learn this method. Thank you for your help and wish you a good day~

0 Kudos
Message 3 of 3
(1,632 Views)