3
{
"timestamp":"2018-10-08T16:58:38.949Z",
"dataFrame":"QQ==",
"fcnt":15,
"freq":902500000,
"port":12,
"rssi":-69,
"snr":10,
"sf_used":10,
"session_id":"f41e10e8-1c73-499c-8ad7-4cbcd54c8ebd",
"gtw_info":[{
"gtw_id":"000000000b0319a3",
"rssi":-69,
"snr":10},
{
"gtw_id":"000000000b031938",
"rssi":-100,
"snr":10.2,
"gps_tmst":1539014318485}],
"id":1539017918949,
"dr_used":"SF10BW125",
"decrypted":true}
My application receives the JSON that above, in this Json there is the array "gtw_info", but as you can notice the data of this array are not always the same for each position. I wonder how I can check when the "gps_tmst" field, for example, exists or not in the array.
Are you using some library for treatment?
– sant0will
I’m using Gson, but I haven’t found anything related to my need so far.
– Emanuele
if you’re using gson you could just turn it into an object and treat it normally
– Lucas Miranda