I am building a YT mp3 downloader. I'm using API from youtubeinmp3. This is how I am getting the download link in JSON format.
I am using this to assign the JSON value for "link" to JS Variable ytdlink. But it's not working, the value for ytdlink is getting set to "function link() { [native code] }".
function getyt()
{
var a = document.getElementById("mquery").value;
$.get(
"http://www.youtubeinmp3.com/fetch/?format=JSON",
{
video:a
},function(data) {
console.log(data);
var ytdlink = data.link;
});
}
How do I assign the link to a JS variable?

linkvalue? I'm honestly not sure..