Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Expresion json in tmap

Hello,
I would like to send a json expression (in tMap) to a tRest for a PUT message but I have an error:

My expression JSON:

 

"{\"EntityList\": \"[\""+"

"{\"EntityName\": \"lead\","+"\"Id": \""+Var.var1+"\","+"\"Attributes\":\"[\""+"

"{\"Name\" : \"crmvi_opt\","+"\"Type\" : \"integer\","+"\"Value\" : \"0\""+"}""+"

\"]\""+"}""\"]\""+"}"

 

Labels (4)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

You are putting quotes around the wrong sections. For example, arrays ([...]) do not need quotes around them. I believe your code should look more like this....

 

"{\"EntityList\": [{\"EntityName\": \"lead\","+"\"Id\": \""+Var.var1+"\","+"\"Attributes\":[{\"Name\" : \"crmvi_opt\",\"Type\" : \"integer\",\"Value\" : \"0\"}]}]}"

View solution in original post

1 Reply
Anonymous
Not applicable
Author

You are putting quotes around the wrong sections. For example, arrays ([...]) do not need quotes around them. I believe your code should look more like this....

 

"{\"EntityList\": [{\"EntityName\": \"lead\","+"\"Id\": \""+Var.var1+"\","+"\"Attributes\":[{\"Name\" : \"crmvi_opt\",\"Type\" : \"integer\",\"Value\" : \"0\"}]}]}"