-
Beta Was this translation helpful? Give feedback.
Answered by
janosh
Sep 12, 2023
Replies: 1 comment 2 replies
-
Mapping does the trick, but I was wondering if there's a prop I'm on the parent I'm missing 🤷 $: allTags = data.allTags.map((tag) => {
return { label: tag.title, value: tag.title }
}) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yep, that's the recommend solution. The
value
key is optional and defaults tolabel
if missing. So you could do