cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
baxschwepo
Helper I
Helper I

Split Array

Hi to all, 

 

as I am somehow desperate in the meantime, I thought there might be someone able to help me...

 

I am receiving a json object in a flow via HTTP request:

 

[{"language":"DE","text":"1000,Screws,102-22222,purchase"}]

 

I want to work with the "text" part and insert the single comma separated values  to a sharepoint list. I am able to extract it via "ParseJson" function to a comma seperated text:

"1000,Screws,102-22222,purchase"

 

How can I split those values?

With a text function (indexof, substring)?

 

I tried the split function and received an array:


["1000","Screws","102-22222","purchase"]


Easy to get the last and first one of the array..how to access 2nd and 3rd item of the array...is there an easy way? 

Is something like 

 

I tried already several hours but couldn't find a good way..so many possibilities...

 

Any suggestions?

 

Thank you very much! Appreciate your help!

baxschwepo_0-1609173189583.png

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ScottShearer
Super User
Super User

@baxschwepo 

You can refer to each element of the array by it's index number - arrays are zero based.  My example below gets the second element:

image.pngimage.png

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

3 REPLIES 3
RezaDorrani
Dual Super User
Dual Super User

Hi @baxschwepo 

 

Here is a video walkthrough of parsing JSON data using flow expressions.

https://www.youtube.com/watch?v=C52brz28poU&list=PLN-cZRQeAiDVQ-6ZWGr43yyTcpu6mUgrR

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Thanks,
Reza Dorrani, MVP
YouTube
Twitter

ScottShearer
Super User
Super User

@baxschwepo 

You can refer to each element of the array by it's index number - arrays are zero based.  My example below gets the second element:

image.pngimage.png

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
baxschwepo
Helper I
Helper I

Thank you, this solved the problem! 
Should have thought about asking the community earlier... 😁

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (3,800)