Thank you again.
Here is the code I did in ESQL to build an Employee array within an Object of Employees
CREATE PROCEDURE CopyEmployees() BEGIN
DECLARE J INTEGER;
DECLARE I INTEGER 1;
SET J = CARDINALITY(InputRoot.JSON.Data.Employee.PKEY[]);
SET OutputRoot.JSON.Data.Count = J;
WHILE I <= J DO
SET OutputRoot.JSON.Data.Employees.Employee[I].PKEY = InputRoot.JSON.Data.Employee.PKEY[I];
SET OutputRoot.JSON.Data.Employees.Employee[I].FIRSTNAME = InputRoot.JSON.Data.Employee.FIRSTNAME[I];
SET OutputRoot.JSON.Data.Employees.Employee[I].LASTNAME = InputRoot.JSON.Data.Employee.LASTNAME[I];
SET OutputRoot.JSON.Data.Employees.Employee[I].COUNTRY = InputRoot.JSON.Data.Employee.COUNTRY[I];
SET I = I + 1;
END WHILE;
End;
This seems to be the secret sauce I needed to make the dish complete.
thanks
------------------------------
Jeff Sinason
------------------------------
Original Message:
Sent: Mon March 16, 2020 09:06 AM
From: Matthias Jungbauer
Subject: Mapping output of DatabaseRetrieve Node
Build a loop for Employee/PKEY
What you wanna do with the Array of Employee objects?
In which syntax do you wanna see the Array of Employee objects?
At the moment you have a XML not a JSON Syntax.
------------------------------
Matthias Jungbauer
------------------------------
Original Message:
Sent: Mon March 16, 2020 07:31 AM
From: Jeff Sinason
Subject: Mapping output of DatabaseRetrieve Node
Matthias
Thank you for your response. I agree that this is probably easier to do in ESQL than a mapping node. My problem is understanding what the ESQL would look like.
------------------------------
Jeff Sinason
Original Message:
Sent: Mon March 16, 2020 06:26 AM
From: Matthias Jungbauer
Subject: Mapping output of DatabaseRetrieve Node
Most of my colleagues would go for ESQL - because they are more experienced with ESQL than with Mapping.
Why don't you do both and tell us what works better for you.
------------------------------
Matthias Jungbauer