How do you parse "pipe delimited data" with coldfusion. Example..

How do you parse this:

Code is setu like this:

Code that needs parsed:

I need to pull out each variable ( status, Pingid, Payout)

God bless.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

that's easy - just treat your variable as a |-delimited list and use appropriate cf list functions or cfloop over the |-delimited list to get the keys/values you need.

one thing to keep in mind: cf treats consecutive list delimiters as one delimiter!
so make sure there are no empty list elements: before you parse the list, change any || to | | (that is pipe-space-pipe) using replace() cf function.
LeadCoAuthor Commented:
Can you provide the code to parse the data so i may see how it works?

<cfset mylist = "Status|Rejected|PingId|4102|Payout|0">
<cfset mylist = replace(mylist, "||", "| |", "all")>
<cfloop from="1" to="#listlen(mylist, '|')#" index="x" step="2">
#listgetat(mylist, x, "|")#=#listgetat(mylist, x+1, "|")#<br />

OR, if you just want to extrace a value of a specific key from the list, say PingId key:
PingID = #listgetat(mylist, listfindnocase(mylist, "PingId", "|")+1, "|")#

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
LeadCoAuthor Commented:
Great! Are you Looking  for work?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development Software

From novice to tech pro — start learning today.