Is there a way to format JSON in an attribute column so that it's easier to read in the map pop-ups? For example, one of the fields in my data contains JSON --
[{"Data_ID":"XXXXXXX","FormDataID":"YYYYYYY","FID":"Lines_p2.atyo12lfi98009938809876344560","Owner":"Example","Material_Type":"P ","Size":"7","Misc_Notes":null,"Permit_No":null}]
I want to pull out Owner, Material, and Size and show in the pop-up. Can this be done with Arcade?
Solved! Go to Solution.
Yep
Create a variable using your $feature.FieldName, then call out the bits in whatever format you want.
Eg
var json= {"Data_ID":"XXXXXXX","FormDataID":"YYYYYYY",
"FID":"Lines_p2.atyo12lfi98009938809876344560",
"Owner":"Example","Material_Type":"P ","Size":"7",
"Misc_Notes":null,"Permit_No":null}
return 'Owner: ' + json.Owner + textformatting.newline +
'Material: ' + json.Material_Type + textformatting.newline +
'Size: ' + json.Size
Yep
Create a variable using your $feature.FieldName, then call out the bits in whatever format you want.
Eg
var json= {"Data_ID":"XXXXXXX","FormDataID":"YYYYYYY",
"FID":"Lines_p2.atyo12lfi98009938809876344560",
"Owner":"Example","Material_Type":"P ","Size":"7",
"Misc_Notes":null,"Permit_No":null}
return 'Owner: ' + json.Owner + textformatting.newline +
'Material: ' + json.Material_Type + textformatting.newline +
'Size: ' + json.Size
That worked. Thank you, Peter!