Basically what I'm trying to do is, from the following string:
--metodo: youtube --busqueda: best music mix
Get the "method", which should return youtube
, and the "search", which should returnbest music mix
As if it were specifying parameters when executing a command.
So the expected result would be an object with the following info:
{
metodo: "youtube",
busqueda: "best music mix"
}
I hope you can help me to do this in the most automatic way possible (without using .replace().. etc). Thank you.