parsing - Acessing variables on JSON request to Mandrill API other than merge_vars -


i'm trying combine mandrill service api can send http posts it, merge variables template , send email. issue it's hard make other api send json object 1 mandrill's api expecting.

the other api can easilly send flat jsons

{"name":"some name","firstvar":"10","secondvar":"20"},

but it's hard make create complex json, inner arrays , on.

another issue json format understood mandrill that, within global_merge_vars, name value pairs aren't paired:

[ { "name":"myvariable" , "content":"123" } ,   { "name":"secondvariable" , "content":"321"} ]  

instead of:

[ { "myvariable":"123" ,      "secondvariable":"321" } ] 

which makes things bit harder.

so i'd know if it's possible mandrill merge other variables within global_merge_vars or merge_vars arrays , reference them name value relation.

if know of solution or service suite case presented, apreciate.

thank in advance.

you'd need write code takes information other api you're working , convert format required mandrill. it's not possible pass mandrill data that's not in format accepts , have map correct formatting - there many possibilities make feasible functionality. you'll want decode json you're getting other api, , construct payload mandrill. might helpful use mandrill api client language you're working make easier, or service zapier pairs apis without needing know how code.


Comments