Skip to content
Advertisement

How get the Employee Title from Admin Directory?

I’m expecting to get the job title of the user via using google app script, but I’m getting the log print as follows

JavaScript

The below is my code

JavaScript

What I’m trying to do is get only the title of the employee. I’ve tried adding [1] or [2] or [3] after the .orgainizations object but it doesn’t work.

What would be the right code to get my answer?

Advertisement

Answer

employee is a array of objects and contains only 1 object with index 0. So, use

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement