Extract all reocurring key from a JSON array without using a for each loop

Sumit Gaur 260 Reputation points
2023-08-25T15:02:05.91+00:00

Hi,

is there a way to basically get all the reoccurring key value from the JSON array without running a for each loop in the logic app standard. for e.g., if i am receiving data like below how can i get value of all the occurrences of message with some query or any other way without going through the loop.

[
    {
        "message": "message 1"
    },
    {
        "message": "message 2"
    }
]
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,551 questions
{count} votes

Accepted answer
  1. VenkateshDodda-MSFT 25,111 Reputation points Microsoft Employee Moderator
    2023-08-28T10:52:07.96+00:00

    @Sumit Gaur Thanks for reaching out to Microsoft Q&A, apologize for any inconvenience caused on this.

    As I have understood that you want to pull the message key value from the JSON array without using foreach loop in your workflow.

    To achieve this, you can either use execute Java script code using Inline action or by using liquid templates in your workflow. You can refer to this documentation for more information inline code and liquid templates.

    Feel free to reach back to me if you have any further questions on this.


2 additional answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.