native code for Object arity=1

Hi I am facing issue while using Object.values(properti) I believe  Object.values() is available for Apigee JS code. I am getting error as shown in below image.

Harshad_Kadam_0-1700888160729.png

 

// get the version from request header + URI
var targetUrl = context.getVariable("target.url");
var pathSuffix = context.getVariable('proxy.pathsuffix');
var reqVersion = "EC-Version";

function orders() {
    return pathSuffix.includes("/order");
}
function payments() {
    return pathSuffix.includes("/pay");
}

var conditions = [
    { condition: orders, value: "orders" },
    { condition: payments, value: "payments.ecommerce" }
];

var matchingCondition = conditions.find(cond => cond.condition());
var requestPath = matchingCondition && matchingCondition.value || null;

reqVersion = "ecommerce.redirect."+ requestPath +'.'+ reqVersion;

print(" \n"+ Object.values(properties));
context.setVariable("redirect.version", JSON.stringify(properties[reqVersion]));
context.setVariable("request.path", requestPath);

 

Is there anything I am missing here.  @dchiesa1   @omidt 

[native code for Object.Object, arity=1] 

also not sure about the meaning of above line. 

Solved Solved
1 2 302
1 ACCEPTED SOLUTION

Hi, I think you asked this question under a different topic, and you posted your solution.  so I think this one is resolved. Let me know if that is not true.

View solution in original post

2 REPLIES 2

Hi, I think you asked this question under a different topic, and you posted your solution.  so I think this one is resolved. Let me know if that is not true.

Yes, thank you for your response. It appears that the answers to the two questions are same.