I think you can use "Parse JSON", more info:
https://stackoverflow.com/questions/56244766/logic-app-read-property-of-json-stored-in-variable
How to retrieve value from SQL Server Action Results
Hello Folks,
I've a recurrence trigger followed by Execute store procedure (V2) action.
When I run that SP it will give an ID.
I'm trying retrieve the value(only value) from that Action.
I'm getting like [{"InvoiceID":"62134"}] But I want the value only. i.e. 62134
How can I achieve this? Is there any possibility to do this via expressions(fx)
Azure Logic Apps
2 answers
Sort by: Most helpful
-
Wilko van de Velde 2,241 Reputation points2023-07-06T12:36:12.76+00:00 -
VenkateshDodda-MSFT 25,241 Reputation points Microsoft Employee Moderator2023-07-07T04:55:02.0833333+00:00 @Ramanarajan D Thanks for reaching out to Microsoft Q&A, apologize for any inconvenience caused on this.
If Stored Procedure in your workflow always return a single value then you can use the below expression to pull the
InvoiceIDbody('Execute_stored_procedure_(V2)')?['resultsets_InvoiceID']?[0]?['InvoiceID']If your stored procedure returns multiple values, then as suggested by Wilko van de Velde you need to use
ParseJSONand also Foreach loop to pull theInvoiceIDvalue.Feel free to reach back to me if you have any further questions on this.