AnsweredAssumed Answered

JSONSetElement Question

Question asked by fmdataweb on Mar 13, 2018
Latest reply on Mar 13, 2018 by jbrown

I have fields in my table for email address, first name and last name. I need to generate some JSON data that looks like this:

 

{

"email_address" : "peter@pan.com",

"merge_fields" :

{

"FNAME" : "Peter",

"LNAME" : "Pan"

},

"status_if_new" : "subscribed"

}

 

I can't work out how to get the first name/last name merge fields syntax correct - my current calc is:

JSONSetElement ( "" ;

["email_address" ; Table::Email ; JSONString];

["status" ; "subscribed"; JSONString]

)

 

which returns this:

 

{

"email_address" : "peter@pan.com",

"status" : "subscribed"

}

 

Anyone show me how to add in the 'merge_fields' component?

Outcomes