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:
"Test": {
"questions" : {
"type" : "Group",
"config" : {
"label": "Questions",
"fields": {
"question": {},
"answer": {}
}
}
},
"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?