1

Use a SSJS Activity I am getting a response in XML from an API call. I need to parse the XML for a specific value. Is this possible in a SSJS Activity?

1
  • I tried using a regex that works client-side but I get this error "Jint.JintException: Object expected: match". – victorcorey Jan 16 '16 at 0:29
1

The online help does not say so. But, I believe the script activity will also process AMPSCript.

SSJS does a great job at parsing JSON. But, there are no SSJS function for parsing XML. Consider using the following AMPScript functions: BuildRowSetFromXML() & TransformXML().

1
  • AMPScript runs in Scripts? Is says "Server Side Java Script". I'll have to give that a try. – victorcorey Jan 19 '16 at 19:18
0

I was able to get this working by using Stringify on the response. Stringify(result.Response).match works.

2
  • Possible to share code? In a similar dilema – Samuel Dare Nov 20 '17 at 18:49
  • I'm trying to remember what project this is for. I'll do some digging. Sorry. – victorcorey Nov 22 '17 at 21:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.