let results = track.split(':');
let jsonObject = JSON.stringify({ title: results[0], band: results[1] });
If you're interested in learning more about how to utilize JSON.stringify, feel free to check out the documentation here. Essentially, this method takes a JavaScript object (as demonstrated in my code snippet) and converts it into a JSON string.
It's important to note that the output may not match exactly what you indicated in your query. The format you provided is actually incorrect for both JavaScript and JSON. The result I've generated will resemble something like
{"title":"Don't Stop Believin'", "band":"Journey"}
. Pay attention to the presence of
{}
instead of
[]
.