-1

I'm having trouble converting my SQL ResultSet to JSON format. I'm using a stored procedure flow to bring in the data then I'm using a transform message to convert the output to JSON.

SQL Result:

resultSet1=[{ProductID=1154526, Qty=-3.0, CustomerID=013337, UnitDiscount=-5.8, CustomerDesc=Lion Beer Stockyard, ProductDesc=Water Ice Vodka 66pf 12/1L BTL -11/44}, {ProductID=1132326, Qty=3.0, CustomerID=013337, UnitDiscount=1.0, CustomerDesc=Lion Beer Stockyard, ProductDesc=Water Ice Vodka 66pf 12/1L BTL -11/44}]

The word resultSet1 also needs to be removed.

aled
  • 21,330
  • 3
  • 27
  • 34
  • What is the issue that you are having? If an error share the messages and details. If not the expected results please share expected vs actual output. And share the transformation you are using. Who is adding that `resultSet1`to the output? Where are you seeing that result (in a log, debugger)? Read https://stackoverflow.com/help/how-to-ask – aled Feb 20 '23 at 22:54

1 Answers1

0

If the input to the transformation is an object with a key resultSet1 which contains an array the the transformation could be:

output application/json
---
payload.resultSet1
aled
  • 21,330
  • 3
  • 27
  • 34