-
Hello cue team, I would like to generate definitions from a list: list = [ { name:"def1", args: 1}, {name:"def2", args:2}]
for _,v in list {
"#\(v.name)": {
args: v.args
}
} result:
The problem is the result is not definitions because the names are quoted, what I would like to have is simply:
Is this possible ? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
You can't currently declare definitions in this way, but you can make them part of an "outer" definition:
|
Beta Was this translation helpful? Give feedback.
-
This discussion has been migrated to cue-lang/cue#937. For more details about CUE's migration to a new home, please see cue-lang/cue#1078. |
Beta Was this translation helpful? Give feedback.
You can't currently declare definitions in this way, but you can make them part of an "outer" definition: