How do I retrieve tags and tag data for an entry in Element API? In Element API v1, I am setting up an endpoint that is trying to expose a news entry including the tags (title, id, slug) associated with it. Thought it could be set up similarly to how you can retrieve categories using an array_map. But my code doesn't seem to work for tags.

'api/news.json' =&gt; [
  'elementType' =&gt; ElementType::Entry,
  'criteria' =&gt; ['section' =&gt; 'news'],
  'transformer' =&gt; function(EntryModel $entry) {
    return [

      'id' =&gt; $entry-&gt;id,
      'title' =&gt; $entry-&gt;title,
      'slug' =&gt; $entry-&gt;slug,
      'postDate' =&gt; $entry-&gt;postDate,
      'url' =&gt; $entry-&gt;url,
      'jsonUrl' =&gt; UrlHelper::getUrl("api/news/{$entry-&gt;id}.json"),
      'description' =&gt; (string) $entry-&gt;newsDescription,
      'tags' =&gt; array_map( function(TagModel $tag) {
        return [
          'id' =&gt; $tag-&gt;id,
          'title' =&gt; $tag-&gt;title,
          'slug' =&gt; $tag-&gt;slug,
        ];
      }, $entry-&gt;newsTags-&gt;find()),
      'type' =&gt; array_map( function(CategoryModel $category) {
        return [
          'id' =&gt; $category-&gt;id,
          'title' =&gt; $category-&gt;title,
          'slug' =&gt; $category-&gt;slug,
        ];
      }, $entry-&gt;newsType-&gt;find()),

    ];
  },
],
I took a break from this project. Came back, looked at the code, and saw a simple overlooked error - had a ")" instead if "}".  Grrr.  Starring too much at pixels lately. Fixed the code. So it's all working now. The array_map with the Tag Model does work.