At my work I have been assigned a challenging task.
I need to convert 125 InDesign product sheets to a JSON-file for our customers data integrator.
They have given me some specs on how they want the data specified, and I would like to automate some of it with Keyboard Maestro – but I am stuck on the tables and hope somebody can help me.
There are 2 types of tables:
Table A should be defined like this in JSON:
"Optimale virkningsforhold":
{
"Temperatur":{
"Minimum": "6 C",
"Optimum": "10 - 12 C"
},
"Luftfugtighed":{
"Optimum": "70%"
}
},
I get this when I copy from InDesign:
Minimum Optimum
Temperatur 6 °C 10 - 12°C
Luftfugtighed 70%
Jordfugtighed Høj
Timer tørvejr 1
And this is the definition for Table B:
"Afgrøde":{
"Bederoer, Rødbeder":{
"Skadegørene":"Flyvehavre...",
"Dosis pr. ha.": "0,5-0,8 l",
"Tidspunkt": "Fra afgr'ders stadium 11"
},
"Bederoer, Rødbeder":{
"Skadegørene":"Kvik",
"Dosis pr. ha.": "0,75-0,8 l",
"Tidspunkt": "Fra afgr'ders stadium 11"
}
}
And this is from InDesign:
Afgrøde Skadegørere Dosis pr. ha. Tidspunkt
Bederoer, Rødbeder Kvik 0,75-0,8 l Fra afgrødens stadium 11
Bederoer, Rødbeder Flyvehavre, græsukrudt, spildkorn 0,5-0,8 l Fra afgrødens stadium 11
Kartofler Kvik 0,75-0,8 l Fra afgrødens stadium 11
Kartofler Flyvehavre, græsukrudt, spildkorn 0,5-0,8 l Fra afgrødens stadium 11
Hope this makes sense and somebody has a good solution.