I have some rather complex data. There is a LOT of it too. I'm looking for an inexpensive way (from a time perspective) to take this format into a flat array:
My data now:
[
{
"id":3070267953047428,
"rowNumber":1,
"expanded":true,
"createdAt":"2017-01-10T14:54:30Z",
"modifiedAt":"2019-12-09T17:12:52Z",
"cells":[{"columnId":3898437847541636,"value":201013.0,"displayValue":"201013"},
{"columnId":8402037474912132,"value":"JS75S PRV Dwg. 72784-2-1","displayValue":"JS75S PRV Dwg. 72784-2-1"},
{"columnId":1083688080435076},
{"columnId":3796166086289284,"value":"2017-01-10T14:54:30Z"},
{"columnId":8299765713659780,"value":"jsmith@company.com","displayValue":"jsmith@company.com"}
]
},
{
"id":7573867580417924,
"rowNumber":2,
"siblingId":3070267953047428,
"expanded":true,
"createdAt":"2017-01-10T14:54:30Z",
"modifiedAt":"2018-07-03T18:25:56Z",
"cells":[{"columnId":3898437847541636,"value":201015.0,"displayValue":"201015"},
{"columnId":8402037474912132,"value":"JS75S316 General Arrg.","displayValue":"JS75S316 General Arrg."},
{"columnId":1083688080435076},
{"columnId":3796166086289284,"value":"2017-01-10T14:54:30Z"},
{"columnId":8299765713659780,"value":"jsmith@company.com","displayValue":"jsmith@company.com"}
]
},
{
"id":6447967673575300,
"rowNumber":3,
"siblingId":7573867580417924,
"expanded":true,
"createdAt":"2017-01-10T14:54:30Z",
"modifiedAt":"2018-07-03T18:25:56Z",
"cells":[{"columnId":3898437847541636,"value":201017.0,"displayValue":"201017"},
{"columnId":8402037474912132,"value":"JS75S316 General Arrg. w/Flue","displayValue":"JS75S316 General Arrg. w/Flue"},
{"columnId":1083688080435076},
{"columnId":3796166086289284,"value":"2017-01-10T14:54:30Z"},
{"columnId":8299765713659780,"value":"jsmith@company.com","displayValue":"jsmith@company.com"}
]
}
]
I need to make it into this form. Or something very similar.
[
{
"id":3070267953047428,
"rowNumber":1,
"expanded":true,
"createdAt":"2017-01-10T14:54:30Z",
"modifiedAt":"2019-12-09T17:12:52Z",
"3898437847541636":201013.0,
"8402037474912132":"JS75S PRV Dwg. 72784-2-1",
"1083688080435076":"",
"3796166086289284":"2017-01-10T14:54:30Z",
"8299765713659780":"jsmith@company.com"
},
{
"id":7573867580417924,
"rowNumber":2,
"siblingId":3070267953047428,
"expanded":true,
"createdAt":"2017-01-10T14:54:30Z",
"modifiedAt":"2018-07-03T18:25:56Z",
"3898437847541636": 201015.0,
"8402037474912132":"JS75S316 General Arrg.",
"1083688080435076":"",
"3796166086289284":"2017-01-10T14:54:30Z",
"8299765713659780":"jsmith@company.com"
},
{
"id":6447967673575300,
"rowNumber":3,
"siblingId":7573867580417924,
"expanded":true,
"createdAt":"2017-01-10T14:54:30Z",
"modifiedAt":"2018-07-03T18:25:56Z",
"3898437847541636":201017.0,
"8402037474912132":"JS75S316 General Arrg. w/Flue",
"1083688080435076":"",
"3796166086289284":"2017-01-10T14:54:30Z",
"8299765713659780":"jsmith@company.com"
}
]
I feel I could do this with a number of text replacement statements. However, that may occasionally not work quite right, depending if special characters are used in the actual values. However, if there is an easier way, that would be great. There has to be accomodation for no value as well. I also realize that a number may not be possible for the label. That can be addressed with a prefix, perhaps.
Thoughts on this??
Thank you!