Skip to main content
Question

How to extract a "grandchild" feature using the JSON Fragmenter?


dangeerah

Hello, I am trying to extract a set of attributes that appear to be "grandchild" away from the parent feature. I am using the JSONFragmenter, and can extract from the parent using the JSON query: json["data"][*], but within this are four child attributes including "geometry", "properties" and "id".

 

I really want to split out a number of attributes within the "properties" section but don't know what I should put in the JSON query? Some of the desired attributes within properties are "laFeatureType", "reference" and "fieldName". But putting json["data"][*]["properties"]["reference"] in the query builder doesnt work.

 

Any help would be greatly appreciated 😀Screenshot 2021-03-09 at 09.49.53Screenshot 2021-03-09 at 09.49.04

4 replies

danilo_fme
Evangelist
Forum|alt.badge.img+44
  • Evangelist
  • March 9, 2021

Hi @dangeerah​ 

Please, could you share the json file?

 

Thanks in Advance,

Danilo


nielsgerrits
VIP
Forum|alt.badge.img+54

A good trick to get the correct json query, is to save the response body to a file, temporarily change input source to file, select the saved file and use the tree to select the element you want, which gives the correct query. Then change back to attribute.

JsonQuerySelect


dangeerah
  • Author
  • March 9, 2021
danilo_fme wrote:

Hi @dangeerah​ 

Please, could you share the json file?

 

Thanks in Advance,

Danilo

Hello @danilo_fme​ ,

I have emailed you a single feature JSON file with the "properties" attribute.

Any help would be appreciated, Thanks 😁


dangeerah
  • Author
  • March 9, 2021
nielsgerrits wrote:

A good trick to get the correct json query, is to save the response body to a file, temporarily change input source to file, select the saved file and use the tree to select the element you want, which gives the correct query. Then change back to attribute.

JsonQuerySelect

Thanks for this. I have tried this and put it in the data query, but would it be along one line like:

json["data"][*]

json["data"][*]["properties"]["area"]

json["data"][*]["properties"]["laFeatureType"]

 

Then attributes to expose:

properties

area

laFeatureType

 

But this does not return any values?

 

Thanks

 

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings