<p>If you have the JSON of the chapters or want to create it, you could import them using FeedMe Pro (required to import the Category element type). It'll import the categories and create child categories if they're not already created.</p>

CC BY-SA 4.0
2018-10-19T16:47:51.507Z
2018-10-19T16:47:51.507Z
CraftQuest
<p>I have to create the following categories hierachically : One book has between 1 and 150 chapters.
I have to do this for several books.  Dealing with chapters is painful using the GUI. Is there any way to achieve this directly using json, queries ?</p>

<p><strong>Category "Book 1" is consisted of 100 chapters subcategory</strong>  </p>

<ul>
<li>Book 1 -> Chap 1 </li>
<li>Book 1 -> Chap 2 </li>
<li>...  </li>
<li>Book 1 -> Chap 100</li>
</ul>

<p><strong>Category "Book 1" is consisted of 10 chapters subcategory</strong>  </p>

<ul>
<li>Book 2 -> Chap 1 </li>
<li>Book 2 -> Chap 2 </li>
<li>...  </li>
<li>Book 1 -> Chap 10</li>
</ul>

<craft3><categories>
Create several subcategories without using the GUI in craft
# Create several subcategories without using the GUI in craft

(Asked by: username_0 on 2018-10-19)

I have to create the following categories hierachically : One book has between 1 and 150 chapters.
I have to do this for several books. Dealing with chapters is painful using the GUI. Is there any way to achieve this directly using json, queries ?

**Category "Book 1" is consisted of 100 chapters subcategory**

* Book 1 -> Chap 1
* Book 1 -> Chap 2
* ...
* Book 1 -> Chap 100

**Category "Book 1" is consisted of 10 chapters subcategory**

* Book 2 -> Chap 1
* Book 2 -> Chap 2
* ...
* Book 1 -> Chap 10

**Tags:** craft3, categories


---

## 1 answers

### Answer by username_1 on 2018-10-19. Score: 1

If you have the JSON of the chapters or want to create it, you could import them using FeedMe Pro (required to import the Category element type). It'll import the categories and create child categories if they're not already created.


---

