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". Commented Jan 16, 2016 at 0:29

2 Answers 2

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. Commented Jan 19, 2016 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
    – 0xsegfault
    Commented Nov 20, 2017 at 18:49
  • I'm trying to remember what project this is for. I'll do some digging. Sorry. Commented Nov 22, 2017 at 21:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .