Mappings caveat or hidded beahaviour or bug with complex json #2561
-
This works:
while this doesn't:
It returns the error which explains nothing: "failed assignment (line 1): mapping returned invalid key type: " |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hey @sviyh 👋 I'm really struggling to reproduce the issue you're seeing. At a quick glance, the bloblang code you shared above isn't valid, since the keys in the root.issue = {
"self": this.self,
"id": this.id,
"key": this.key,
"creator": this.fields.creator.displayName
} You'd get nulls if the input message doesn't have the fields which are being referenced via LE: Moving to a discussion as per #2026. |
Beta Was this translation helpful? Give feedback.
Hey @sviyh 👋 I'm really struggling to reproduce the issue you're seeing. At a quick glance, the bloblang code you shared above isn't valid, since the keys in the
issue
object you're trying to create aren't double quoted. For example, this works just fine:You'd get nulls if the input message doesn't have the fields which are being referenced via
this
, but I'm not sure how to reproduce the error you're seeing.LE: Moving to a discussion as per #2026.