Sep-11-2019, 04:33 AM
Hi, i have a preoccupation, i know the process to follow but not exactly how to implement it.
so i have a json file which looks like
so the first thing i want to do is store as array the signal name with their different values, and the corresponding time value as follow
so i have a json file which looks like
json = [{"signal_name":"X", "signal_value":"valueX1", "time"="timeX1","par"="id1"}, {"signal_name":"Y", "signal_value":"valueY1", "time":"timeY1","par":"id2"}, {"signal_name":"Z", "signal_value":"valueZ1", "time":"timeZ1","par":"id3"}, {"signal_name":"X", "signal_value":"valueX2", "time":"timeX2","par":"id5"}]and so many other lines...
so the first thing i want to do is store as array the signal name with their different values, and the corresponding time value as follow
Array_nameX = [ "valueX1", "valueX2" … valueXN; "timeX1", "timeX2", … "timeXN"] Array_nameY = [ "valueY1", "valueY2" … valueYN; "timeY1", "timeY2", … "timeYN"] Array_nameZ = [ "valueZ1", "valueZ2" … valueZN; "timeZ1", "timeZ2", … "timeZN"]and finally construct an dictionnary with the key value the name of my signal, and the value as the different arrays
dict = [X: array_nameX, Y:array_nameY,...]