-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs/howto: export specific elements in a top-level list #195
Labels
howto
For content that in the "howto" diataxis quadrant
Comments
Is there a conversation somewhere that motivated this? |
No. I needed to parse some JSON output when building cuelang.org, and realised we don't cover this issue's precise use case on the site. My specific use case
|
cueckoo
pushed a commit
to cue-lang/cuelang.org-trybot
that referenced
this issue
Feb 18, 2025
This adds a guide that demonstrates using the "cue export" command to place a list data file at an addressable location with "-l", and then using "-e" with integer list indexing to access a specific element. Closes cue-lang/docs-and-content#195. Preview-Path: /docs/howto/export-element-top-level-list/ Signed-off-by: Jonathan Matthews <[email protected]> Change-Id: Idb75479a03e8c1798d39558f937f8bd01d3d60fb Dispatch-Trailer: {"type":"trybot","CL":1208967,"patchset":1,"ref":"refs/changes/67/1208967/1","targetBranch":"master"}
cueckoo
pushed a commit
to cue-lang/cuelang.org-trybot
that referenced
this issue
Feb 19, 2025
This adds a guide that demonstrates using the "cue export" command to place a list data file at an addressable location with "-l", and then using "-e" with an integer list index to access a specific element. Closes cue-lang/docs-and-content#195. Preview-Path: /docs/howto/export-top-level-list-element/ Signed-off-by: Jonathan Matthews <[email protected]> Change-Id: Idb75479a03e8c1798d39558f937f8bd01d3d60fb Dispatch-Trailer: {"type":"trybot","CL":1208967,"patchset":2,"ref":"refs/changes/67/1208967/2","targetBranch":"master"}
cueckoo
pushed a commit
to cue-lang/cuelang.org-trybot
that referenced
this issue
Feb 24, 2025
This adds a guide that demonstrates using the "cue export" command to place a list data file at an addressable location with "-l", and then using "-e" with an integer list index to access a specific element. Closes cue-lang/docs-and-content#195. Preview-Path: /docs/howto/export-top-level-list-element/ Signed-off-by: Jonathan Matthews <[email protected]> Change-Id: Idb75479a03e8c1798d39558f937f8bd01d3d60fb Dispatch-Trailer: {"type":"trybot","CL":1208967,"patchset":3,"ref":"refs/changes/67/1208967/3","targetBranch":"master"}
cueckoo
pushed a commit
to cue-lang/cuelang.org-trybot
that referenced
this issue
Feb 24, 2025
This adds a guide that demonstrates using the "cue export" command to place a list data file at an addressable location with "-l", and then using "-e" with an integer list index to access a specific element. Closes cue-lang/docs-and-content#195. Preview-Path: /docs/howto/export-top-level-list-element/ Signed-off-by: Jonathan Matthews <[email protected]> Change-Id: Idb75479a03e8c1798d39558f937f8bd01d3d60fb Dispatch-Trailer: {"type":"trybot","CL":1208967,"patchset":4,"ref":"refs/changes/67/1208967/4","targetBranch":"master"}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We have the pages https://cuelang.org/docs/howto/export-fields-whose-names-are-not-valid-identifiers/ and https://cuelang.org/docs/howto/refer-to-fields-whose-names-are-not-valid-identifiers/, but they don't explicitly mention how the elements of a top-level list can be accessed.
Show an example like this on a separate page, but where
This page will exist to demonstrate the
-e
required. No matching page should be needed to handle the case where the reference is required inside CUE code, as that follows directly from this example and the pages mentioned above.The text was updated successfully, but these errors were encountered: