Skip to content

Mappings caveat or hidded beahaviour or bug with complex json #2561

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

You must be logged in to vote

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:

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 this, but I'm not sure how to reproduce the error you're seeing.

LE: Moving to a discussion as per #2026.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@sviyh
Comment options

@mihaitodor
Comment options

Answer selected by sviyh
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
Converted from issue

This discussion was converted from issue #2560 on May 05, 2024 08:39.