Original post is here.
JSON with arrays is troublesome in getting values when operating with LogicApps / Flow. Converting the values horizontally and vertically like PIVOT and converting so that related values can be acquired with specific key values may make subsequent processing easier.
For example in this case. Normally, you loop through SampleArray and check the values one by one. Since the current Logic Apps and Flow can only deal with this way, the purpose is to want to make it even easier here.