0
votes

dataweave 2.0 script in Anypoint Studio 7.3 while building JSON always add quotations to the object, even if it's not value but new JSON object.

My code looks like this:

%dw 2.0
output application/java
import * from dw::core::Strings
var studyId = vars.request.studyId
---
{[
    {
      (vars.keytype): value1,
      StudyId: value2
    },
    (vars.condition)
]}

where (vars.condition) is just another json object:

{"key1":"value"}

the Question is how to remove extra quotations surrounding (vars.condidtion)?

1

1 Answers

0
votes

The most probable reason for it to add extra quotes is that your condition variable doesn't have the application/json mime-type set.