hguerrero edited a comment on issue #1035: can't use a function processor with 
javascript
URL: https://github.com/apache/camel-k/issues/1035#issuecomment-548160392
 
 
   Ok, refactored to modify body using:
   
   ```
   function processInventory(e) {
       e.getMessage().setBody(
           JSON.stringify({
               flavor: e.getMessage().getBody(),
               inventoryId: '12345'
           })
       )
   }
   ```
   
   It returns expected value but body is in different format: 
`{"flavor":[104,101,121],"inventoryId":"12345"}`
   
   What is the correct way to retrieve the body as String?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to