-2

I am retrieving YouTube video description from the below link, but how do I detect the url in the description of video and put that url in anchor tag.

Possible duplicate of How to replace plain URLs with links?

URL:- https://www.googleapis.com/youtube/v3/videos?id=XL9Ri8pO68w&part=snippet&key=AIzaSyDwvYPAjxKcrcnU_fOZxHl3YSfdTA7fVl0

Community
  • 1
  • 1

1 Answers1

0

You can use Jquery .getJSON() function:

$.getJSON('https://www.googleapis.com/youtube/v3/videos?id=XL9Ri8pO68w&part=snippet&key=AIzaSyDwvYPAjxKcrcnU_fOZxHl3YSfdTA7fVl0', function(data) {
//data is the JSON string
});
Manish Jain
  • 1,197
  • 1
  • 11
  • 32