The subject might not be the best, I am not exactly sure the best description for what I need and am having problems with.
I am struggling to figure out what I need to do to work out an issue I am having. What I currently have is a function that returns a JSON object containing multiple fields.
For example:
foo(x):: {
[x + i]: {
.....
} for i in ["1", "2"]
},
I then want to for loop over that and really just concatenate all of the output of that into one object.
local items = ["a", "b", "c"],
foo(item) for item in items,
But trying to execute this simply throws the error: "STATIC ERROR: ......: Object comprehension can only have one field."
The results I am expecting would be the equivalent of:
foo("a") + foo("b") + foo("c")
However, I need a way to do this programmatically. Hopefully I am just missing something subtle (or obvious) that helps me accomplish what I am needing.
Thanks,
Preston