Skip to main content
Question

How write JSON

  • September 16, 2021
  • 6 replies
  • 24 views

fmesafe.podpora
Contributor
Forum|alt.badge.img+11

Hi, does anyone know how to write input data to one "block?" I have input data - 8 frequency values (pic1), which are written to the dataset as individual "blocks" (pic2), but I need to write frequencies to one "block" ( pic3 ) Thanks a lot

6 replies

daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • September 17, 2021

Hi @fmesafe.podpora​,

I'm sorry, but pic3 doesn't give us a clear picture of how you would like the data arranged. Would you be able to mock up what you would like to see using a text editor?


fmesafe.podpora
Contributor
Forum|alt.badge.img+11

Hi,

ok:-) This data ( 1 - 8 ) are the data of one airport. I need this data to be within one block - all data under one featuretype .


daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • September 21, 2021

Hi @fmesafe.podpora​,

It will be easiest to build the JSON list in a JSONTemplater first, then write it to the JSON writer with a data type of json.

Screen Shot 2021-09-21 at 8.50.42 AMThis produces the following JSON:

Screen Shot 2021-09-21 at 8.49.13 AMThe workspace is attached.


fmesafe.podpora
Contributor
Forum|alt.badge.img+11

Thanks for the help, but it's not exactly what I need, as it's all together. I need to have separate branches in one block. The block is equal to the airport, the sub-branch is the name of the airport, icao kod, Cz name, en name ...., another branch of frequency + attributes of frequencies, another branch of the runway + attributes of runways, etc. the block will be one airport with branches, where each branch will have its own attributes (frequency, runways, etc.) I apologize if I do not express myself exactly. thank you very much


fmesafe.podpora
Contributor
Forum|alt.badge.img+11

Can't anyone give me advice? Should I try to specify the problem in more detail?


mmccart
Enthusiast
Forum|alt.badge.img+17
  • Enthusiast
  • October 5, 2021

Hi @fmesafe.podpora, The mockup you provided doesn't quite make sense with the terminology you're using in your post. Could you manually build out the JSON syntax that what you want to see as an output based on the input table screenshot you provided in your original post? It sounds like you are trying to generate nested JSON arrays within arrays. I can point you in the right direction, but needs more guidance on the final output/structure that you're looking for.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings