# Grouping, or "nesting" fields inside an object

**URL:** <https://community.prismic.io/t/grouping-or-nesting-fields-inside-an-object/6587>\
**Category:** Developing with Prismic\
**Created:** [August 12, 2021, 8:20pm UTC](https://community.prismic.io/t/grouping-or-nesting-fields-inside-an-object/6587 "2021-08-12T20:20:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![marco2](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/marco2/32/2734_2.png) [@marco2](https://community.prismic.io/u/marco2)\
**Post date:** [August 12, 2021, 8:20pm UTC](https://community.prismic.io/t/grouping-or-nesting-fields-inside-an-object/6587/1 "2021-08-12T20:20:52Z")

</div>

In Prismic, I know that `"type" : "Group"` can be used to nest a **repeatable** group of fields. Is there a way to nest a non-repeatable group of fields? For example, let's say I'm creating a test with 10 repeating questions, but I only need to allow for **one** essay. Consider the example below:

```nohighlight
"Test": {
	// Questions can be repeatable
	"questions" : {
		"type" : "Group",
		"config" : {
			"label": "Questions",
			"fields": {
				"question": {},
				"answer": {}
			}
		}
	},
	// Essay should not be repeatable, only allow 1 a
	"essay" : {
		"type": "???", // <- What type do I use here?
		"config": {
			"label": "Essay",
			"fields": {
				"prompt": {},
				"help-text": {}
			}
		}
	}
}

```

When I access `data.questions` I'll get an array of questions, but how can I make it so `data.essay` only gives me a single object, instead of an array of them? Is there a way to achieve this either through the "Build mode", or JSON editor?

---

<div class="post-metadata">

**Author:** ![Fares](https://avatars.discourse-cdn.com/v4/letter/f/71e660/32.png) [@Fares](https://community.prismic.io/u/Fares)\
**Post date:** [August 16, 2021, 8:58am UTC](https://community.prismic.io/t/grouping-or-nesting-fields-inside-an-object/6587/3 "2021-08-16T08:58:54Z")

</div>

Hi there,

Welcome to the Prismic community.

I will gather some information and do some tests and get back to you.

In fact, for such a use case we recommend using slices as it gives more flexibility.

Can you explain how different is [Q&A (FAQ)](https://prismic.io/concepts/content-modeling/faq-page) from what you are trying to achieve?

Best,  
Fares

---

<div class="post-metadata">

**Author:** ![Fares](https://avatars.discourse-cdn.com/v4/letter/f/71e660/32.png) [@Fares](https://community.prismic.io/u/Fares)\
**Post date:** [September 15, 2021, 9:34am UTC](https://community.prismic.io/t/grouping-or-nesting-fields-inside-an-object/6587/5 "2021-09-15T09:34:37Z")

</div>

Hi @marco2,

Sorry for the delay,

In fact, you need to set the key `config.repeat` to `false` if you don't want the group field to be repeatable.

For more info please check this [article](https://prismic.io/docs/core-concepts/group#json-model).

Please let me know if you need more info,  
Fares

---

<div class="post-metadata">

**Author:** ![Fares](https://avatars.discourse-cdn.com/v4/letter/f/71e660/32.png) [@Fares](https://community.prismic.io/u/Fares)\
**Post date:** [September 22, 2021, 10:23am UTC](https://community.prismic.io/t/grouping-or-nesting-fields-inside-an-object/6587/7 "2021-09-22T10:23:48Z")

</div>

closed on September 22, 2021, 10:23am UTC, flag & select 'Something Else' to reopen.

This thread has been closed due to inactivity. [Flag to reopen](https://community.prismic.io/t/re-open-a-thread/2175).

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)\
**Post date:** [December 9, 2021, 12:02pm UTC](https://community.prismic.io/t/grouping-or-nesting-fields-inside-an-object/6587/8 "2021-12-09T12:02:11Z")

</div>

Opened on December 9, 2021, 12:02pm UTC



---

<div class="post-metadata">

**Author:** ![jordan1](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@jordan1](https://community.prismic.io/u/jordan1)\
**Post date:** [March 18, 2022, 6:54pm UTC](https://community.prismic.io/t/grouping-or-nesting-fields-inside-an-object/6587/9 "2022-03-18T18:54:46Z")

</div>

Hi @Fares,

When I use `config.false`, the UI on document screen hides the button to "add" a new row, which means I cannot add even a single row of fields. Unless I'm missing something?

---

<div class="post-metadata">

**Author:** ![Fares](https://avatars.discourse-cdn.com/v4/letter/f/71e660/32.png) [@Fares](https://community.prismic.io/u/Fares)\
**Post date:** [March 22, 2022, 7:12am UTC](https://community.prismic.io/t/grouping-or-nesting-fields-inside-an-object/6587/11 "2022-03-22T07:12:43Z")

</div>

Hi Jordan,

Well, it depends on your use case, this thread is actually about adding a nonrepeatable group field, is that is what you are looking for?
