FeatureSet object

Overview

This topic discusses the JSON representation of feature sets. The featureSet object contains feature objects, including the values for the fields requested by the user. For layers, if you request geometry information, the geometry of each feature is also returned in the featureSet. For tables, the featureSet does not include geometries.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{
  "objectIdFieldName": "<objectIdFieldName>", //optional
  "globalIdFieldName": "<globalIdFieldName>", //optional
  "displayFieldName": "<displayFieldName>", //optional
  "geometryType": "<esriGeometryPoint | esriGeometryMultipoint | esriGeometryPolyline | esriGeometryPolygon | esriGeometryEnvelope>",
  "spatialReference": <spatialReference>, //for feature layers only.
  "hasZ": <true|false>, //optional  Default is false.
  "hasM": <true|false>, //optional  Default is false.
  "fields": [
    {"name": "<fieldName1>", "type": "<fieldType1>", "alias": "<fieldAlias1>", "length": "<length1>"},
    {"name": "<fieldName2>", "type": "<fieldType2>", "alias": "<fieldAlias2>", "length": "<length2>"}
  ],
  "features": [ //features will include geometry for feature layers only
    <feature1>,
    <feature2>
  ]
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.