So, I assume that you have a json object named jsonObject:
var url = "http://example.com/";
jsonObject.playlist[0] = url;
On the other hand, if you are talking about the construction of a json object, then you just put the variable in the right position:
var url = "http://example.com/";
var jsonObject = {playlist: [
url,
{
url: 'another URL goes here'
}
]
}
, , url , , .