Hi devs,

I spent hours trying to select all "results" properties in a JSON payload 
within a javascript (script mediator), without success.

After
var payload = mc.getPayloadJSON();

I can easily select first levels "results" and get an array  with
var allResults = payload.results;

that works fine,  but selecting ALL "results" elements in the JSON (whatever 
the level there are) with
var allResults = payload..results;

doesn't work and gives me an error
"The script engine returned an error executing the inlined js script function 
mediate."
And strangely because my payload is json:
org.mozilla.javascript.EcmaError: TypeError: [object Object]  is not xml object.

How could I do this ?
Thanks for this,
Bernard

_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to