Skip to content
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

Can't use numbers as labels and convert string to numbers #103

Open
irom77 opened this issue May 29, 2021 · 0 comments
Open

Can't use numbers as labels and convert string to numbers #103

irom77 opened this issue May 29, 2021 · 0 comments

Comments

@irom77
Copy link

irom77 commented May 29, 2021

It fails when I am trying to use numbers for labels, i.e. InfoIdx: '{.LicenseCapacityInfoIdx}' . Once I change to "9" and "10" in JSON below it is fine. But again when I am using value i.e. CurrUsage: '{.LicenseCapacityCurrUsage}' it fails until I remove 'Mbps" ... Is it possible to use some function to help convert strings to numbers (for values) and numbers to strings (for labels)?

{ "AgLicenseCapacityInfoTable":[{ "LicenseCapacityInfoIdx": 9, "LicenseCapacityPeakUsage": "2000Mbps", "LicenseCapacityCurrUsage": "95.21 Mbps", "LicenseCapacityPeakTimeStamp": 1620812697 }, { "LicenseCapacityInfoIdx": 10, "LicenseCapacityPeakUsage": "284 CPS", "LicenseCapacityCurrUsage": "2 CPS", "LicenseCapacityPeakTimeStamp": 0 }] }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant