Mapping non-group fields into Group fields using Field mapper

835
2
09-30-2016 03:55 AM
AhsanMukhtar1
New Contributor II

I have received json as input on a tcp socket, and created a GeoEvent service that sends it into  json file in output folder. The input json has no group field but i want to send output having a group field. I tried to bind it using Field Mapper but it did not work. I have created a separate definition having group field that i want as output. How can i convert my non-group json input to group output json. 

 

Input JSON :          

{

   "id" : "R1",

   "lat" : 73.0001,

   "long" : 33.0014

}

Output JSON:

{

      "data" : {

        "id" : "R1",

         "lat" : 73.0001,

         "long" : 33.0014

   }

}

Tags (2)
0 Kudos
2 Replies
RomanChueh
New Contributor III

Have you find a solution to your problem? 

0 Kudos
deleted-user-GKyg-xriCvci
New Contributor II

I know it is an old question bus has anyone found an answer? Or is there some kind of workaround of how to send output JSON which has grouped attributes?

0 Kudos