-
-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add window for creating custom JS-based parser #631
Comments
There might also be few standard parsers in a drop-down auto-fill menu, like: <select>
<option value="">Select from some standard parsers</option>
<option value="function(value) { return value.split(/\\s+/); }">Tabulated input parser</option>
<option value="function(value) { return value.split(','); }">CSV parser</option>
</select> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It would be very handy to pass original input from mqtt topic to mqtt explorer through a JS syntax based parser function
Sample prototype:
This is how I see it working internally:
This way, users would be able to transform whatever they have into already well enough handled Javascript object.
Example
Say, I have tabulated input, as follows:
Then I could specify how to handle this by filling
Custom Parser
window with this text:and strange text string will turn into quite meaningful object:
And now I can conveniently view history, add certain values to chart panel, etc.
NOTE
This requires calling
eval()
, which some might consider unsafe, so a warning might be shown before enabling this feature.The text was updated successfully, but these errors were encountered: