Getting value from a JSON point #3097
-
Hi, I'm getting some point values from MQTT source and that value is in string and JSON format. Can I script or do something to get a point with value=21 for presentations and charts in SCADA LTS ? |
Beta Was this translation helpful? Give feedback.
Answered by
fabiodurao
Feb 27, 2025
Replies: 1 comment 1 reply
-
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
a3pl1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
It is possible to do this conversion using a meta datapoint.
1 - First, create this mqtt datapoint that returns this json in string;
2 - Create a meta datasource and then a datapoint with the name "kitchen" for example;
3 - In this datapoint, set it as numeric, add the mqtt datapoint created in item 1, within the context and give it a nickname "kitchen";
4 - Use the following script to convert the string to json and return only the value;
5 - Click on the green circle to the le…