'How to select specific object property into a string array (in a single action)

Say I have some array of objects

[
    {
        "Property": "1"
    },
    {
        "Property": "2"
    },
    {
        "Property": "3"
    }
]

I want to select just Property so I end up with a string array, so I can later call join() on it

[
    "1",
    "2",
    "3"   
]

I tried using the Select action, but it asks me to map to a property, so I just end up with yet another object array:

enter image description here

I guess I could initialise a string and the loop around the array, appending the property each time, but is there a way of doing this in a single action?



Solution 1:[1]

You can use Parse JSON for this. Here is my logic app

enter image description here

I guess I could initialise a string and the loop around the array, appending the property each time, but is there a way of doing this in a single action?

Like you have mentioned you can use outputs('Compose')?['Property'] to fetch the property.

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 SwethaKandikonda-MT