cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Papageno
Level: Powered On

Convert JSON array to string array

I have a SharePoint list with a column of the type Single line of text called Language and another column of the type Choice (checkboxes, multiselect) called Chosen languages.

The following example shows these two columns for four list items.

example 1.png

 

In my flow, I have an Apply to each loop to iterate through the list items. For every item I need to check if Language is present among the languages in Chosen languages.

In the above example the first and second item would return true, whereas the third and fourth items would return false.

I tried to solve this using a Condition and check if Chosen languages contains Language. Here is my try:

example 2.png

This didn’t work because Language is a string and Chosen languages is not an array of strings, it’s an array of JSON objects. See this example from the third item:

 

 

[
  {
    "@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    "Id":2,
    "Value":"Norwegian"
  },
  {
    "@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    "Id":3,
    "Value":"English"
  }
]

 

 

After this long and probably tedious introduction, here’s my question:

How can I need to convert the JSON array to a string array?

Is there an easier way to accomplish this?

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Convert JSON array to string array

Hi @Papageno 

 

Here it is

 

 

array2.png

 

 

Finally outside loop

array3.png

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



View solution in original post

1 REPLY 1
Super User
Super User

Re: Convert JSON array to string array

Hi @Papageno 

 

Here it is

 

 

array2.png

 

 

Finally outside loop

array3.png

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

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 Kudoed Authors (Last 30 Days)
Users online (7,037)