0

I'm trying to print just 1 element of the response (see below) when performing say a List Workspace Shares - eg. I would like to print just the email.

I have tried response.data[email], response.email to no avail.

Can anyone point me in the right direction here?

Thanks,

Sean

From the SDK docs.

{ "pageNumber": 1, "pageSize": 100, "totalPages": 1, "totalCount": 2, "data": [ { "id": "AAAQSF82FOeE", "type": "USER", "userId": 4583173393803140, "email": "john.doe@smartsheet.com", "name": "John Doe", "accessLevel": "OWNER", "scope": "ITEM", "createdAt": "2016-02-17T22:24:09Z", "modifiedAt": "2016-02-17T22:24:09Z" }, { "id": "AQAISF82FOeE", "type": "GROUP", "groupId": 2331373580117892, "name": "Group 1", "accessLevel": "ADMIN", "scope": "ITEM", "createdAt": "2016-02-17T22:24:09Z", "modifiedAt": "2016-02-17T22:25:08Z" } ]

1 Answers1

0

Data is an array so you need to get the first item and only then the email, it should looks something like :

response.data[0].email