cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
liko
Level: Power Up

Extract value from JSON Array without using Apply To Each

Hello everyone, 

 

I have a JSON that has the following format:

 

{
  "value": [
    {
     "title": "Title 1",
      "ID": "9ee4ee0d-388a-4c87-8ff0-b2584eac42e3",
    },
    {
      "title": "Title 2",
      "ID": "9ee4ee0d-388a-4c87-8ff0-b2584eac42e3-1",
    },
    {
      "title": "Title 3",
      "ID": "9ee4ee0d-388a-4c87-8ff0-b2584eac42e3-2",
    }
  ]
}

 

I used Data Operations - Select to extract the ID fields  and now I have the following format:

 

[
  {
    "ID": "9ee4ee0d-388a-4c87-8ff0-b2584eac42e3"
  },
  {
    "ID": "9ee4ee0d-388a-4c87-8ff0-b2584eac42e3-1"
  },
  {
    "ID": "9ee4ee0d-388a-4c87-8ff0-b2584eac42e3-2"
  }
]

 

I want to extract the values of all the IDs and return them as a string.

I have already managed to do so, using 'Variables-Initialize Variable', 'Aply To Each' and 'Variables-Append to string Variable'.  I am looking for a solution where I don't have to use the 'Apply To Each' ,as this operation takes a fews seconds to complete and the latency increases with increasing number of items (in the case above only 3). Does anyone know how to return all the IDs as a string without the use of Apply To Each?

 

Any kind of help or input is appreciated. Thank you in advance! 

1 REPLY 1
Community Support Team
Community Support Team

Re: Extract value from JSON Array without using Apply To Each

Hi @liko,

 

Per my certain research and test, I am afraid that it might be not possible to extract all the IDs and set them as a string without using Apply to each.

 

There is another customer request the same feature on join function, please see it at here:

https://powerusers.microsoft.com/t5/Flow-Ideas/Data-Operations-Join-don-t-need-Apply-to-each-flow/id...

 

Please vote and comment the idea at here. I will keep an eye on this issue to see if there are other available methods.

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (4,688)