AnsweredAssumed Answered

How do I access the attribute values of a feature when iterating through the featureSet returned by a queryTask?

Question asked by pierckbp on Feb 12, 2016
Latest reply on Feb 12, 2016 by pierckbp

After returning my featureSet from a query, I want to be able to pass an array to d3 to do some visualizations and analyses. How do I either convert the returned featureSet to an array or get the attributes returned from a feature? The only thing I've managed to do is get a count of features.

 

array.forEach(featureSet.features, function(feature) {

  featureCount += 1;

  console.log("feature attributes are" + Would love to display a value from an attribute here);

  });

 

How do I access field values on the feature?

Outcomes