{"price": {"selector":".price","type":"float" },}// or use this shortcut{"price": ".price | float"}
Output
{"price": 2.99}
Boolean
For various reasons, we may want to convert a value to the Boolean type. Let's start with an example we check that the content of the element is empty.
{"isExistContent1": {"selector":".content-1","type":"boolean" },"isExistContent2": {"selector":".content-2","type":"boolean" },}// or use this shortcut{"isExistContent1": ".content-1 | boolean","isExistContent2": ".content-2 | boolean"}