how to extract data from json payload

chandan15
Tera Contributor

Hi,

I'm getting this payload, how can I get "accountId" as out put in flow designer action. I tried JSON parser, still not getting the out put.

payload:-

[ {
"accountId" : "6180ca2b327da",
"accountType" : "atlassian",
"active" : "true",
"displayName" : "AADITYA TANK",
"emailAddress" : "aaditya.tank",
"locale" : "en_US",
"self" : "https://kohler.atlassian.net/rest/api/2/user?",
"timeZone" : "America/Belize",
"x16" : null,
"x24" : null,
"x32" : null,
"x48" : null
} ]

1 ACCEPTED SOLUTION

Saurabh Gupta
Kilo Patron
Kilo Patron

Hi,

You can get this payload in a variable and return within input to flow action.

 

var t=[ {
"accountId" : "6180ca2b327da",
"accountType" : "atlassian",
"active" : "true",
"displayName" : "AADITYA TANK",
"emailAddress" : "aaditya.tank",
"locale" : "en_US",
"self" : "https://kohler.atlassian.net/rest/api/2/user?",
"timeZone" : "America/Belize",
"x16" : null,
"x24" : null,
"x32" : null,
"x48" : null
} ];

return t[0].accountId;

 

 


Thanks and Regards,

Saurabh Gupta

View solution in original post

1 REPLY 1

Saurabh Gupta
Kilo Patron
Kilo Patron

Hi,

You can get this payload in a variable and return within input to flow action.

 

var t=[ {
"accountId" : "6180ca2b327da",
"accountType" : "atlassian",
"active" : "true",
"displayName" : "AADITYA TANK",
"emailAddress" : "aaditya.tank",
"locale" : "en_US",
"self" : "https://kohler.atlassian.net/rest/api/2/user?",
"timeZone" : "America/Belize",
"x16" : null,
"x24" : null,
"x32" : null,
"x48" : null
} ];

return t[0].accountId;

 

 


Thanks and Regards,

Saurabh Gupta