Skip to content

Is it possible to get back an array? #738

Discussion options

You must be logged in to vote

Oh got it. @inlang/core/query won't be of help.

You probably need to read the JSON yourself to iterate over the keys and dynamically construct the nav bar. Or, use an array directly:

<script>
  const navbar = ["home", "profile"]
</script>

{#each Object.keys(navbar) as nav}
  <p>{i(nav)}</p>
{/each}

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@omar2205
Comment options

@samuelstroschein
Comment options

Answer selected by omar2205
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: inlang/paraglide-js Related to source-code/sdk-js.
2 participants