Hi,

I'm working in automatizing a script for JSON files that contain datasets with several environmental measurements.

I need to indicate that for each dataset the program copy some parameters such as

Time, Ch4,etc

an example of the path I need to achieve for the data is the following:

$datasets[[1]]$P12_R1$reps$REP_1$data$timestamp

Solution would be trivial if wasn't that the name of the treatment 'P12_R1' appears as a title in the SJORN file, so every 'datasets' has a diferent 'treatment_name' . I need a diferent solution than just ask the program to look for i in 'datasets'

Example of the paths I need to obtain:

$datasets[[1]]$P12_R1$reps$REP_1$data$timestamp

$datasets[[2]]$P12_R2$reps$REP_1$data$timestamp

$datasets[[3]]$P12_R3$reps$REP_1$data$timestamp

$datasets[[4]]$P13_R1$reps$REP_1$data$timestamp

[...]

Also, sampling is random every campaign so P12_R1 doesn't always belong to datasets[[1]] and so on.

I'm working in r since my colleagues prefer it, but any solution in python will be helpfull as well.

thank you very much in advance

Similar questions and discussions