I did this and it worked:
```
        if type(results) == type([]):
            for jobInfo in results:
                parentJobNames.append(jobInfo['name'])
        else:
            parentJobNames.append(results['name'])
```