You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How to pass SDP data to java script as input parameter

Summary:

Hi Experts, @Sherif Bashar

I have a requirement to pass SDP & ADP as input parameter to JS. ADP is subset of SDP and JS need to return SDP minus ADP data.

SDP = [
{ id: 1, name: "Item1" },
{ id: 2, name: "Item2" },
{ id: 3, name: "Item3" }
];

let ADP = [
{ id: 2, name: "Item2" }
];

JS output - [
{ id: 1, name: "Item1" },
{ id: 3, name: "Item3" }
];

ADP I can pass as - $page.variables.commentsADP.data

How do i pass SDP data - Please help !!

function removeSubset(SDP, ADP, key) {
console.log("Original SDP:", JSON.stringify(SDP));
console.log("ADP to be removed from SDP:", ADP);
// Create a Set of keys in ADP for quick lookup

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!