Esri / arcade-expressions

ArcGIS Arcade expression templates for all supported profiles in the ArcGIS platform.
Apache License 2.0
272 stars 95 forks source link

push directly to dict, no intermediate vars #60

Closed jdcarls2 closed 2 months ago

jdcarls2 commented 2 years ago

It's been a while since I contributed the addition of the Push function to some of the Data Expressions. I've been using versions of these expressions extensively since, and I've thought better of the creation of intermediate vars feat and features.

Instead, why not just create the output dict first (like before), but use the function directly with the dict?

Push(outDict['features'], {attributes:{someatt: 'someval'}})

I also did some minor formatting tweaks and cleaned up some unnecessary whitespace.