@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.