Parsing complex JSON in import set transform map

yuriy_chemerys
Kilo Explorer

Hi.

Need some help here.

I'm creating import set REST web service with transform map. Body of the request to web service should look like:

{

          "id": "rNP3Dd3By0",

          "updated_at": "2015-03-20T22:55:54.972499+00:00",

          "entity": {

              "id": "GLN45KNzy9",

              "name": "Rue La La",

              "extra": {

                  "origin_type_label": "",

                  "origin_type_label_plural": ""

              }

          },

}

I want to map "entity.name" to a table field, but I cannot find a way to do that.

In a transform script I cannot access name field by doing "entity.name". Also JSON and JSONParse classes doesn't seem to be available in transform script.

Is it possible to process complex JSON in transform map or I need to create my own web service?

Thanks,

Yuriy

2 REPLIES 2

BenPhillipsSNC
Kilo Guru

Hi Yuriy,



You will want to try to map that field using a Field Map Script. You can also run other scripts on the whole transform using transform scripts.



Thanks


Ben


alexbones
Tera Expert

Hi Yuriy,

were you able to figure this out. I am doing something similar where I am trying to do a JSON import and need to make the import set table dynamic to the content of the body of the JSON message so I don't have to continually create and map fields for each unique field. 

Thanks,

Alex