'Get Google "pills" value as Plain text from Google docs with Google Apps Script

I am trying to pull the value of the new feature in Google Docs: the "pills"(unsure about this name).

Google Pills

I am parsing a table in a doc with a Google App Script. When I am getting to the row (see image) I am getting null. I can't figure out what should I run to get this value as Plain text.

The code I run to get this at the moment that returns null:

Logger.log(table.getCell(i, 1).getText())
> null

How can I get the actual value of the "pill"?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source