id image_url caption
----------------------------------
1 a.jpg aa
1 b.jpg bb
2 x.jpg xx
1 c.jpg cc
2 y.jpg yy
I got this data in an edge. I would like to get 2 json records as output like below to send to an api one by one. Please help if anyone know how to create below format. Thanks in advance !!!
I am not exactly sure how the output should look like because the two output records are not valid JSON records. There are two issues in there:
A) names and string values should be in double quotes,
B) root element should not be named.
I prepared an example where two approaches are used. One contains a named array which is wrapped by root element and the the other one contains a root array but without any name. You can pick the approach you like. If the output should really be invalid, you can not use JSONWriter components to create invalid JSON files. You could use StructuredDataWriters and Reformats instead.