Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I need help with creating JSON structure. I need to get it look like this:
{
"dps":[ { "x":1485801000000, "y":[ 37.22, 37.37, 36.64, 36.82 ] }, { "x":1485714600000, "y":[ 37.74, 37.84, 37.33, 37.42 ] }, { "x":1485455400000, "y":[ 38.0, 38.45, 37.81, 37.98 ] }
]
}
It means that there is one loop called "dps" containing array of data. Each part of this loop cantains two elements x and y. X has single value, but Y has multiple values (array).
This is how my input data looks like:
123456789|91.2650|91.7500|89.6600|89.7900
123456799|89.5000|90.4600|87.0800|87.1800
123456788|90.6100|94.0000|90.4000|93.7800
123456777|94.9400|95.1390|88.5100|89.4700
My x value is in the first column of each row. Y values are stored in other four columns. I tried almost everything with tWriteJsonField but no success came out.
Does anyone have an idea how to deal with it?
Hello,
Could you please take a look at this webpage:
Here is a related topic:https://community.talend.com/t5/Design-and-Development/Create-array-inside-JSON/m-p/54119
Best regards
Sabrina