Is your feature request related to a problem? Please describe.
I have some data structures I seen unable to re-create from within the data management panel. The main issue seems to be around having keys on my objects. For example, take this languages.json file:
I am unable to create a UI for adding and managing new languages, because it seems I am unable to define the key for each object.
Describe the solution you'd like
The ability to define one of the sub-object entries, to become a key for the data. For example with the data above, I would define the key as shorthand.
Describe alternatives you've considered
I am considering finding a way to break the data into separate files or arrange the data in another way. I don't have a plan yet.
Additional context
I have other data types that follow a similar pattern though which I would also like to make editable. For example, these translations:
en: {
meta: {
title: '',
rssTitle: 'RSS Feed',
jsonTitle: 'JSON Feed',
description: 'EN',
opengraphDefaultAlt: 'An English description of the default opengraph image'
},
header: {
skipLink: 'Skip to content'
}
},
sv: {
meta: {
title: '',
rssTitle: 'RSS Feed',
jsonTitle: 'JSON Feed',
description: 'SV',
opengraphDefaultAlt: 'A Swedish description of the default opengraph image'
},
header: {
skipLink: 'Hoppa till innehållet'
}
},
**Is your feature request related to a problem? Please describe.**
I have some data structures I seen unable to re-create from within the data management panel. The main issue seems to be around having keys on my objects. For example, take this `languages.json` file:
```
{
"en": {
"dir": "ltr",
"label": "English",
"shorthand": "GB",
"locale": "en-gb"
},
"sv": {
"dir": "ltr",
"label": "Svenska",
"shorthand": "SE",
"locale": "sv-se"
}
}
```
I am unable to create a UI for adding and managing new languages, because it seems I am unable to define the `key` for each object.
**Describe the solution you'd like**
The ability to define one of the sub-object entries, to become a key for the data. For example with the data above, I would define the `key` as `shorthand`.
**Describe alternatives you've considered**
I am considering finding a way to break the data into separate files or arrange the data in another way. I don't have a plan yet.
**Additional context**
I have other data types that follow a similar pattern though which I would also like to make editable. For example, these translations:
```
en: {
meta: {
title: '',
rssTitle: 'RSS Feed',
jsonTitle: 'JSON Feed',
description: 'EN',
opengraphDefaultAlt: 'An English description of the default opengraph image'
},
header: {
skipLink: 'Skip to content'
}
},
sv: {
meta: {
title: '',
rssTitle: 'RSS Feed',
jsonTitle: 'JSON Feed',
description: 'SV',
opengraphDefaultAlt: 'A Swedish description of the default opengraph image'
},
header: {
skipLink: 'Hoppa till innehållet'
}
},
```
<!-- github-sync-id:1845336950 -->
Hi @scottsweb, that is correct; the library we use (uniforms) expects the JSON schema for rendering the form. In your case, the locale key is dynamic; it is not supported.
JSON Schema has the patternProperties option, which would not allow the tool to render the input for a dynamic key.
Hi @scottsweb, that is correct; the library we use (uniforms) expects the JSON schema for rendering the form. In your case, the locale key is dynamic; it is not supported.
JSON Schema has the `patternProperties` option, which would not allow the tool to render the input for a dynamic key.
<!-- github-comment-id:1674639754 -->
Thanks for confirming @estruyf — I think this issue can be closed for now as its out of scope. I might be able to adjust my settings too and find a path forward.
Thanks for confirming @estruyf — I think this issue can be closed for now as its out of scope. I might be able to adjust my settings too and find a path forward.
<!-- github-comment-id:1682856925 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Is your feature request related to a problem? Please describe.
I have some data structures I seen unable to re-create from within the data management panel. The main issue seems to be around having keys on my objects. For example, take this
languages.jsonfile:I am unable to create a UI for adding and managing new languages, because it seems I am unable to define the
keyfor each object.Describe the solution you'd like
The ability to define one of the sub-object entries, to become a key for the data. For example with the data above, I would define the
keyasshorthand.Describe alternatives you've considered
I am considering finding a way to break the data into separate files or arrange the data in another way. I don't have a plan yet.
Additional context
I have other data types that follow a similar pattern though which I would also like to make editable. For example, these translations:
Hi @scottsweb, that is correct; the library we use (uniforms) expects the JSON schema for rendering the form. In your case, the locale key is dynamic; it is not supported.
JSON Schema has the
patternPropertiesoption, which would not allow the tool to render the input for a dynamic key.Thanks for confirming @estruyf — I think this issue can be closed for now as its out of scope. I might be able to adjust my settings too and find a path forward.