Nested tokens by category? #481
Answered
by
six7
davatron5000
asked this question in
Q&A
-
Hey! Is it possible to have the nested category headings in the output JSON? e.g. Colors, Typography, etc... How it currently looks: {
"Brand Colors": {
"Red": {
"value": "#FF0000",
"type": "color"
},
"Green": {
"value": "#00FF00",
"type": "color"
},
"Headings": {
"H1 Headline": { ... },
"H2 Headline": { ... }
}
} Ideal output: {
"color": {
"Brand Colors": {
"Red": {
"value": "#FF0000",
"type": "color"
},
"Green": {
"value": "#00FF00",
"type": "color"
}
},
"typography": {
"Headings": {
"H1 Headline": { ... },
"H2 Headline": { ... }
}
}
} Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
six7
Mar 2, 2022
Replies: 1 comment 2 replies
-
You could just include these as part of the name, I realize that makes those category headings appear twice in the UI, but other than that this would be fine. We're revamping how these categories are displayed in the future and one of the ideas would be to not group by type but rather just group by your naming structure. So in your case just changing the JSON to
would do the trick. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
davatron5000
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You could just include these as part of the name, I realize that makes those category headings appear twice in the UI, but other than that this would be fine. We're revamping how these categories are displayed in the future and one of the ideas would be to not group by type but rather just group by your naming structure.
So in your case just changing the JSON to
would do the trick.