JSON Data Set in Custom Field

Mark Wood
Tera Contributor

Hello Experts,

I am using postman tool to push JSON data from postman tool to my table.

{

 

    "u_ma_fld_source": "test",

 

    //"u_ma_fld_node": "",

 

    "u_ma_fld_type": "MyDemo",

 

    "u_ma_fld_resource": "Splunk",

 

    "u_ma_fld_severity": "1",

 

    "u_ma_fld_description": "Alert CorrCorrelation :Rule based",

    "u_ma_fld_additional_information": {

        "IP": "192.168.1.1",

        "Source": "SCOM",

        "node": "*ASSET-IBM"

    },



    "u_ma_fld_message_key": "Abhijeet"

}

When i pass above JSON data i am getting value in {IP=192.168.1.1, Source=SCOM, node=*ASSET-IBM}for a field but i want output like {
"IP": "192.168.1.1",
"Source": "SCOM",
"Node": "*ASSET-IBM"
}

how can achieve this please guide me on this.

1 REPLY 1

Anil Lande
Kilo Patron

Hi,

If you stringify the the JSOn then you will get optput like that.

 

use var obj = JSION.stringify(resp);

gs.info(obj);

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande