I have dropdown menu in which the value in the different options have number and a text component (example: "5.5 Auto"), because in some cases I use the "5.5" value an in others the "Auto".
For the firse case I use:
Number(parseFloat($w("#option1").value)); for using the number component of the option, and works great.
But in the other case I only find this that works (is in the backend):
item.option1 = item.option1.substr(4);
(this is for saving in the database "Auto" instead of "5.5 Auto")
Anybody knows a better way to accomplish this without just substract 4 characters? Something that extract the pure "Text" component of the value.