I have a gigantic json file that I need to convert only some of the object keys into a csv. Here is a sample of what the json looks like:
Here is also some formatted raw sample data and not just a screenshot:
{
"1234567890": {
"id": "sdggdfgfhfgdhfg",
"cards": {
"252632123": {
"id": "id_554874455544456646",
"fingerprint": "fsadljfhnsdikiubcb",
"last4": "5555",
"exp_month": 12,
"exp_year": 2024,
"brand": "Visa"
}
}
},
"2345678912": {
"id": "sdggdfgfhfgdhfg",
"cards": {
"252632123": {
"id": "id_554874455544456646",
"fingerprint": "fsadljfhnsdikiubcb",
"last4": "5555",
"exp_month": 12,
"exp_year": 2024,
"brand": "Visa"
}
}
},
"3456789012": {
"id": "sdggdfgfhfgdhfg",
"cards": {
"252632123": {
"id": "id_554874455544456646",
"fingerprint": "fsadljfhnsdikiubcb",
"last4": "5555",
"exp_month": 12,
"exp_year": 2024,
"brand": "Visa"
}
}
}
}
I'm wondering if anyone can point me in the right direction of the best way to create a csv that creates 4 columns with the highlighted values highlighted in the screenshot above? So the output I would be looking for would be this:
Can I do this with Node.js? Maybe some other library that does exactly this? A job for python? I prefer some kind of Javascript solution but am open to any suggestions.
Thank you!

