Using an ALIAS

476
1
01-27-2011 11:08 AM
p_thibault
New Contributor
A REST query will return a JSON response.  It is very easy to get a value for a field.  However, if the query is done on a featureclass that has been JOINED.... the field names are no longer simple, but instead have the table name included .... such as  streams.width.

features[0].attributes.streams.width gives an error.  It does not like the two part name.  If I assign an alias to the field, how can I use it?

Thanks
0 Kudos
1 Reply
ShaneCastlen
New Contributor
You can also access a object's properties like associative arrays. So maybe you could do something like this?

features[0].attributes['streams.width']
0 Kudos