Hot answers tagged

2

I did the following and was able to get the shortUrl: var result = HTTP.Post(url, contentType, Stringify(payload), headerNames, headerValues); var resultStringified = Stringify(result) var obj = Platform.Function.ParseJSON(resultStringified); var objResp = Platform.Function.ParseJSON(obj.Response[0]); var shortUrl = objResp.shortUrl; Write(...


1

Since you typed the parameter as a string, you have to encode the payload as JSON: { "data": "[ { \"attendantYear\":\"2014;2015;2016;2018;2019\",\"birthDate\":\"1981-12-11\",\"city\":\"New-York\",\"country\":\"USA\",\"email\":\"jean-paul.gus@gmail....


1

You've got the right idea. Here's some working code based on your example. %%[ var @json set @json = '[ { "name":"Lunch1", "quantity":1, "bonus_products":[] }, { "name":"Lunch2", "quantity":2, "bonus_products":[] }, { "...


1

You are comparing an array with a string. Try updating the code like: for (Object namedStatusAsObject : (List<Object>) mapCustList.get('list')) { Map<String, Object> namedStatus = (Map<String, Object>) namedStatusAsObject; if (((String) namedStatus.get('Name')) == 'AA') { mapList.add(namedStatus); } }


Only top voted, non community-wiki answers of a minimum length are eligible