cancel
Showing results for 
Search instead for 
Did you mean: 

JSON Formating

peter
New Contributor III

Hi

I have a set of data from ServiceNow that use a different header for each record and I would like to flatten this data to a single level. But I am not sure how as each header is different. See the example below;

{
"RITMNumber": "RITM3993",
"number": "SCTASK8011",
  "RITM3993": {
  "requested_for": "Pal",
  "location": "Home"

},
{
“RITMNumber”: “RITM3791”,
“number”: “SCTASK7217”,
“RITM3791”: {
“requested_for”: “Bob”,
“location”: “Work”
}
I would like, i.e. lose the headers RITM3993, RITM3791,…

{
"RITMNumber": "RITM3993",
"number": "SCTASK8011",
"requested_for": "Pal",
"location": "Home"

},
{
“RITMNumber”: “RITM3791”,
“number”: “SCTASK7217”,
“requested_for”: “Bob”,
“location”: “Work”
}

Any help much appreciated.

2 REPLIES 2

cstewart
Former Employee

See attached pipeline segment.CS-XXX_2020_11_30.slp (4.6 KB)
Screenshot 2020-11-30 at 08.52.27
image

peter
New Contributor III

Doh, that was easy.

Thanks