explode string in jquery

0 votes

I'm getting the following result through ajax.

row=Shimla|1|http://vinspro.org/travel/ind/

I wanna http://vinspro.org/travel/ind/ from it. I have used find and split function but it is not working . please let me know how I can get it?

var result=$(row).split('|');
    alert(result);

chrome showing the following error

Uncaught Error: Syntax error, unrecognized expression: Shimla|1|http://vinspro.org/travel/ind/ 

Jun 23 in Web Development by gaurav
• 13,460 points
6 views

1 answer to this question.

0 votes

Use the JavaScript split() method

If you want to explode or split a string from a certain character or separator you can use the JavaScript split() method. The following example will show you how to split a string at each blank space. The returned value will be an array, containing the splitted values.

answered Jun 23 by rajatha
• 4,940 points

Related Questions In Web Development

0 votes
1 answer

JQuery Ajax Post results in 500 Internal Server Erro

The 500 Internal Server Error is a ...READ MORE

answered Jun 23 in Web Development by rajatha
• 4,940 points
6 views
0 votes
1 answer

how to use substr() function in jquery?

To get substring of a string in ...READ MORE

answered 3 days ago in Web Development by rajatha
• 4,940 points
4 views
0 votes
1 answer

How to loop through array in jQuery?

Generic loop: var i; for (i = 0; i ...READ MORE

answered 2 days ago in Web Development by rajatha
• 4,940 points
5 views
0 votes
1 answer

Get current date in DD-Mon-YYY format in JavaScript/Jquery

Get Current Date In DD-Mon-YYY Format In ...READ MORE

answered 2 days ago in Web Development by rajatha
• 4,940 points
3 views
0 votes
1 answer

What is jQuery?

Hey, jQuery is a fast and concise JavaScript ...READ MORE

answered Feb 14, 2020 in JQuery by kartik
• 37,500 points
294 views
0 votes
1 answer

Uncaught TypeError: Cannot read property 'msie' of undefined - jQuery tools

Hello, Use the following script tag in your ...READ MORE

answered Apr 28, 2020 in JQuery by Niroj
• 82,720 points
8,335 views
0 votes
1 answer

Uncaught Error: Bootstrap's JavaScript requires jQuery

Hello @kartik, You have provided wrong order for ...READ MORE

answered Apr 28, 2020 in JQuery by Niroj
• 82,720 points
15,186 views
0 votes
1 answer

How to make Bootstrap popover Appear/Disappear on hover instead of click?

Hello @kartik, Set the trigger option of the popover to hover instead ...READ MORE

answered May 12, 2020 in JQuery by Niroj
• 82,720 points
1,186 views
0 votes
1 answer

Get checkbox value in jQuery

To get the value of the Value ...READ MORE

answered Jun 23 in Web Development by rajatha
• 4,940 points
7 views
0 votes
1 answer

Get checkbox value in jQuery

if you have set a class or id for it, you ...READ MORE

answered Jun 23 in Web Development by rajatha
• 4,940 points
6 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP