0
votes

How can I get the permalink_url only of using Soundcloud API tracks? It returns all fields.

How am I able to return only the permalink_url?

I tried this but no luck: I tried this but no luck: http://api.soundcloud.com/tracks.json?client_id=XX&q=Charlie%20Puth&limit=100&fields=permalink_url

1

1 Answers

0
votes

You should be able to parse the returned JSON for the permalink_url. Something like:

var parsedJSON = JSON.parse(tracksJSON);
var permalink = parsedJSON.permalink_url;

If you have jQuery, I believe $.getJSON automatically parses the info for you as well. I hope this helps you!