Skip to content

bloblang syntax about flatten arrays in array and set a dynamic key in an object #3068

Answered by mihaitodor
fearfate asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @fearfate you can't assign to expressions like that. Maybe try this:

root = this.merge({("key:%v".format(123456)): "value"})

The extra () are necessary, unfortunately.

Regarding flatten(), I'm not sure what the question is.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@fearfate
Comment options

@mihaitodor
Comment options

@fearfate
Comment options

@mihaitodor
Comment options

@fearfate
Comment options

Answer selected by fearfate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants