Hello,
I am having difficulties with extracting JSON messages and since this is my first time to deal with JSON extracting in LabVIEW, I am not sure whether it is possible to solve it and how.
Now, JSON input is something like this:
{"VALUE1":{"0":{"x":100,"y":0.2},"1":{"x":300,"y":0.4},"2":{"x":500,"y":0.6}},"VALUE2":{"0":{"x":1000,"y":0.200},"1":{"x":300,"y":0.4},"2":{"x":500,"y":0.6}},"VALUE2":{"0":{"x":10000,"y":0.2000},"1":{"x":3000,"y":0.04},"2":{"x":5000,"y":0.06}},"VALUE2":{"0":{"x":1000,"y":0.200},"1":{"x":300,"y":0.4},"2":{"x":500,"y":0.6}},"VALUE3":{"0":{"x":1000,"y":0.200},"1":{"x":300,"y":0.4},"2":{"x":500,"y":0.6}},"VALUE5":{"0":{"x":1000,"y":0.200},"1":{"x":300,"y":0.4},"2":{"x":500,"y":0.6}}}
You can see that I can have mixed object items: one "value1", repeated (multiple) "value2", one "value3", missing "value4" and then "value5"...
Any object item can be multiplied or missing in different messages I receive.
My question is how to extract repeated object items and plot them on a XY graph? To be more precise, if I get no item in a message - I should keep the old values (not to have drop to zero on a graph), if I get one item, I should just plot it and if I get multiple items in a message, I should plot all of them on a graph.
This is what I did so far. It plots and keeps old values if nothing received but I have problem extracting multiple values.
I would appreciate any hint or help.
Thanks in advance,
Misa.