Skip to main content

Hi,

@takashi

I am getting a json file out of a http call. This json is very big and there are many nested values. I need to get some certain values from this json. For example, I need to get the "OTXMP_GPSLatitude". This GPS latitude value is existing many times in the json. I tried to extract this value using many json extraction querys but I get an empty attribute. Some of the json querys I used are : (json["data"]["regions"][*]["OTXMP_GPSLongitude"], or json[*]["OTXMP_GPSLatitude"]). I will attach the json file. I hope that someone can help me getting all the coordinates from this json by one request or json extraction.

Thanks in advance,

I think you can use the JSONFragmenter with this query expression to extract every "regions" object as JSON fragment,

json["results"][*]["data"]["regions"]

then use the JSONExtractor with these expressions extract latitude/longitude from each fragment.

json["OTXMP_GPSLatitude"]

json["OTXMP_GPSLongitude"]


Thanks a lot @takashi. I was mistaken by the place of [*]. Your solution works good. :)

Regards,,

Muhammed


I think you can use the JSONFragmenter with this query expression to extract every "regions" object as JSON fragment,

json["results"][*]["data"]["regions"]

then use the JSONExtractor with these expressions extract latitude/longitude from each fragment.

json["OTXMP_GPSLatitude"]

json["OTXMP_GPSLongitude"]

Nice Job @takashi


@takashi After knowing the right place for the [*], now I can get the specific values I need directly from the jsonExtractor without using jsonFragmenter for example by using the following query expression

json["results"][*]["data"]["regions"]["OTXMP_GPSLatitude"]

or using a similar expression to extract the ids as following:

json["results"][*]["data"]["properties"]["id"]

 

Thanks again Takashi :)

 

Regards,,

Muhammed