pulldata with custom JavaScript functions: parsing a json object to get field names with special characters

752
1
12-09-2020 10:57 AM
KimberlyMcCallum
New Contributor III

I have a survey where I use a custom JavaScript function to fetch watershed feature service data from a geopoint input and I can't seem to correctly parse the json response object for the watershed geometry in the XLS form. Specifically, I am after the 'SHAPE.AREA' attribute which is inconveniently named with a period (SHAPE.AREA) I was expecting the JavaScript syntax attributes["SHAPE.AREA"] to work in my pulldata function but it does not. Can anyone advise? 

 This is what I tried that did not work: 
pulldata("@json", ${watershedFeatureData}, "attributes['SHAPE.AREA']")
 
Here is my json object: 
{"attributes":{"OBJECTID":8370,"HUC10":"1709000505","NAME":"Little North Santiam River","GLOBALID":"{1DAD296C-E29C-11E2-8094-0021280458E6}","SHAPE.AREA":0.0333403261176857,"SHAPE.LEN":1.2658292857788298}}
 
Thanks in advance!

 

 

0 Kudos
1 Reply
IsmaelChivite
Esri Notable Contributor

Ouch!

Could you extract the value using JS syntax within your function?

0 Kudos