Rest API json structure

0
I have a raw JSON structure which I need to sterilize which means it has one object which has all the information however I want to map the inside information to auto populate the data. Can anyone help me on this?
asked
3 answers
0

Kanhaiya,

In Studio Pro:

  • Create a JSON Structure document
  • Copy your raw JSON into that document
  • Click the Refresh button
  • Close and save the JSON Structure document

image.png

 

Next,

  • create an Import Mapping document in Studio Pro
  • select JSON as your schema source
  • choose the JSON structure you just create
  • under Schema Elements, select Check All
  • Click OK

image.png

 

Finally, in your Import Mapping, click Map Automatically.  Studio Pro will then create all of the domain entities for you.

 

To actually import data, you'll want to create a microflow that uses an Import with Mapping action to ingest the data from your JSON structure.

 

Hope that helps you get started,

Mike

answered
0

Hello Mike, thanks for looking into it however this is not what I'm looking for as you can see in the image I have "content" as the only object which has string data type, and that 'content' has other lots of information, and I want to map that information separately and populate after hitting the API .  However, right now I'm getting all the information at one place which is content object.  Like 'Content' is it possible to create another object manually and then map it.Screenshot 2025-02-11 171145.png

answered
0

Hi Kanhaiya,

It seems that this is JSON inside a JSON, so you can continue this path (creating an object with the attribute 'contents') and then feed this into the next JSON import mapping.

So after the first time:

Input:

{ "contents":"{\"header\":\"hello\"}"}

Output:

An object with the attribute contents then gets the value:

{"header": "hello"}

If you then feed this into the next import mapping, you can get an object with attribute name 'header' and value 'hello'.

image.png

Good luck!

answered