All,
I am trying to make a GeoJSON Layer from a source I do not control. I have a property in the GeoJSON (example below) that is actually an Object, not a string/number, etc, and I am attempting to display labels on the map, but can only access the root objects.
The labelingInfo is the class I am trying to get working properly. As you can see in the linked code pen example, I am unable to get the core_details (or hopefully, core_details.device_type) to display. Any help would be greatly appreciated!
https://codepen.io/AIM_Atlas/pen/QWBQdLa?editors=0010
Did you ever figure this out? Is it possible. I have seen some GEOJson examples that have an object but not how to access it.
It's not possible to use fields inside an object directly. However, you can use RequestInterceptor to flatten the field structure so that you can use the field data from inside field objects.
See for example https://codepen.io/bsvensson/pen/YzjaKQg?editors=0010 -- which uses RequestInterceptor to create new fields like "core_details__device_type".
cc: @JulianDurantini , @ScottSurber
[Update] Looks like @UndralBatsukh already answered this in the original issue post -- https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geojson-layer-property-is-an-obje...