# How to get subcategories from category object

**URL:** https://meta.discourse.org/t/how-to-get-subcategories-from-category-object/53147
**Category:** Development
**Created:** [11월 20, 2016, 4:55오후 UTC](https://meta.discourse.org/t/how-to-get-subcategories-from-category-object/53147 "2016-11-20T16:55:32Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![kgish](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kgish/32/121131_2.png) [@kgish](https://meta.discourse.org/u/kgish)
#### Post date: [11월 20, 2016, 4:55오후 UTC](https://meta.discourse.org/t/how-to-get-subcategories-from-category-object/53147/1 "2016-11-20T16:55:32Z")

</div>

In my plugin route, I access the list of categories as follows:

```plaintext
model: function(params) {
    var store_url = Ember.get('Discourse.SiteSettings.annotator_store_url');
    return ajax(`/categories.json`).then((data) => {
        return data.category_list.categories;
    });
}

```

This object contains subcategory\_ids as an array of integers. How can I then access these objects as well?

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [11월 20, 2016, 6:22오후 UTC](https://meta.discourse.org/t/how-to-get-subcategories-from-category-object/53147/2 "2016-11-20T18:22:44Z")

</div>

You can get the full category list from `site.json`.
