AnsweredAssumed Answered

Mapping - Adding a JSON element to a JSON file

Question asked by 68675834 on Jul 14, 2016
Latest reply on Jul 16, 2016 by richard_moon

I’m trying to use a mapping function to map a JSON profile to another JSON profile. The goal is to add a new field (CLASS) to the input profile and then put the input file inside another JSON object (attributes). The problem I’m running into is the profile contains an object (result) that doesn’t have predefined fields so it appears there is no way to map result to result and pull in all the sub fields for that object. I was thinking this would be a good use case for a custom script but it appears only Groovy 1.8 supports JsonBuilder and JsonSlurper. Any ideas on how I can accomplish this?

 

Outcomes