Avatar of carsRST
carsRSTFlag for United States of America

asked on 

Jquery - parse a comma delimited string

Is there a way in jquery to parse a comma delimited string?

It will always only be one line of data to parse.  


JavaScriptHTMLScripting Languages

Avatar of undefined
Last Comment
Michel Plungjan
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of carsRST
carsRST
Flag of United States of America image

ASKER

Thanks again!
A few comments

1) jQuery is not needed to (and afaik cannot) PARSE a comma delimited string - plain JS split(",") is the thing that does this and jQuery can then act on the resulting array..
2) jQuery map has a simpler sibling called each if you need to do something to each value.

So depending on what you need to do with the values, you may want to look into split, each and map in ascending order of complexity
JavaScript
JavaScript

JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and in almost every mainstream web browser.

127K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo