':param json_category_tree: dict
:return array of main Category, dict of [Integer, Category]'

def map_category_tree(self, json_category_tree):

    indexed_categories = {}
    main_categories = []
    for json_main_category in json_category_tree.values():
        main_category = self.map_category(json_main_category)
        if (main_category is not None):
            main_categories.append(main_category)
            indexed_categories[main_category.id] = main_category
            for sub_category in main_category.sub_categories:
                indexed_categories[sub_category.id] = sub_category
    return (main_categories, indexed_categories)
