Working with JSAPI v.3.31 on WAB DE widget stuff. So I have a query that returns a feature set, in fact it's a single feature, so that:..
var resultFeatures = featureSet.features;
var graphic = resultFeatures[0];
. Then I provide some styling and add it to the map
var symbol = new SimpleFillSymbol();
symbol.setColor(new Color([255,0,51,0.5]));
graphic.setSymbol(symbol);
this.map.graphics.add(graphic);
I can access the attributes of the feature using:
var attributes = graphic.attributes
But I can't figure out how to step through them, to selectively add them to an InfoTemplate or otherwise process the attribute info. All of the below has failed because attributes is type Object..
attributes.forEach( function()...)
dojo.forEach(attribute,function()...)
array.forEach(attribute,function()...)
What's the solution here? I don't want to have to access each attribute directly:
grahic.attributes['myattribute']
THANKS!