Skip to main content

Easy-way to parser nested json <--> csv file.

Project description

Parse Nested Json to CSV:

Easy two-way conversion between json structure to csv files.

This module has also proven useful for "parser" a json schema to csv file.

Requires a 'json object' and file path to write csv. See unit tests for full example.

   'cursor':{ 
      'hasNextKey':True,
      'nextKey':'eyJoYXNoVW5pcXVlIjp7InMiOiJmZjM1MDc5NmQyY2Q4MzYyMGU4YWEyNzViZGYyMGZlMDA0MDk1M2M1IiwibiI6bnVsbCwiYiI6bnVsbCwibSI6bnVsbCwibCI6bnVsbCwic3MiOm51bGwsIm5zIjpudWxsLCJicyI6bnVsbCwibnVsbCI6bnVsbCwiYm9vbCI6bnVsbH0sInNhbGVEYXRlVGltZSI6eyJzIjoiMjAxOS0wNy0zMVQwODo0MzowOSIsIm4iOm51bGwsImIiOm51bGwsIm0iOm51bGwsImwiOm51bGwsInNzIjpudWxsLCJucyI6bnVsbCwiYnMiOm51bGwsIm51bGwiOm51bGwsImJvb2wiOm51bGx9LCJwdkNvZGUiOnsicyI6Ijc3ODc5ODk5IiwibiI6bnVsbCwiYiI6bnVsbCwibSI6bnVsbCwibCI6bnVsbCwic3MiOm51bGwsIm5zIjpudWxsLCJicyI6bnVsbCwibnVsbCI6bnVsbCwiYm9vbCI6bnVsbH19'
   },
   'content':{ 
      'transactions':[ 
         { 
            'mdrFee':2.5,
            'saleDate':'2019-07-31',
            'mdrAmount':17.81,
            'cardNumber':'490172******9818',
            'tid':'11081907312242263704',
            'status':'APPROVED',
            'discountAmount':17.81,
            'installmentQuantity':7,
            'captureTypeCode':2,
            'tracking':[ 
               { 
                  'status':'APPROVED',
                  'date':'2019-07-31',
                  'amount':712.39
               }
            ],
            'boardingFeeAmount':0.0,
            'saleHour':'23:20:37',
            'nsu':5541647,
            'flexAmount':0.0,
            'captureType':'ECOMMERCE',
            'feeTotal':2.5,
            'authorizationCode':84792,
            'amount':712.39,
            'netAmount':694.58,
            'device':'RO894937',
            'flex':False,
            'movementDate':'2019-07-31',
            'tokenized':False,
            'saleSummaryNumber':55850000,
            'flexFee':0.0,
            'deviceType':'ECO',
            'brandCode':2,
            'orderNumber':'73727204834416',
            'merchant':{ 
               'companyNumber':'77879899',
               'companyName':'WESTWING',
               'documentNumber':'14776142000150',
               'tradeName':'WESTWING COMERCIO VAREJISTA EIRELI'
            },
            'modality':{ 
               'type':'CREDIT',
               'code':1,
               'product':'IN_INSTALLMENTS_NO_INTEREST',
               'productCode':3
            }
         },
         { 
            'mdrFee':2.14,
            'saleDate':'2019-07-31',
            'mdrAmount':4.71,
            'cardNumber':'415275******6127',
            'tid':'10031907312118162555',
            'status':'APPROVED',
            'discountAmount':4.71,
            'installmentQuantity':3,
            'captureTypeCode':2,
            'tracking':[ 
               { 
                  'status':'APPROVED',
                  'date':'2019-07-31',
                  'amount':220.29
               }
            ],
            'boardingFeeAmount':0.0,
            'saleHour':'21:30:31',
            'nsu':984565655,
            'flexAmount':0.0,
            'captureType':'ECOMMERCE',
            'feeTotal':2.14,
            'authorizationCode':39040,
            'amount':220.29,
            'netAmount':215.58,
            'device':'RO894937',
            'flex':False,
            'movementDate':'2019-07-31',
            'tokenized':False,
            'saleSummaryNumber':55849999,
            'flexFee':0.0,
            'deviceType':'ECO',
            'brandCode':2,
            'orderNumber':'73727184628625',
            'merchant':{ 
               'companyNumber':'77879899',
               'companyName':'WESTWING',
               'documentNumber':'14776142000150',
               'tradeName':'WESTWING COMERCIO VAREJISTA EIRELI'
            },
            'modality':{ 
               'type':'CREDIT',
               'code':1,
               'product':'IN_INSTALLMENTS_NO_INTEREST',
               'productCode':3
            }
         },
         { 
            'mdrFee':2.14,
            'saleDate':'2019-07-31',
            'mdrAmount':5.15,
            'cardNumber':'498406******5373',
            'tid':'10011907311932357262',
            'status':'APPROVED',
            'discountAmount':5.15,
            'installmentQuantity':4,
            'captureTypeCode':2,
            'tracking':[ 
               { 
                  'status':'APPROVED',
                  'date':'2019-07-31',
                  'amount':240.77
               }
            ],
            'boardingFeeAmount':0.0,
            'saleHour':'20:14:11',
            'nsu':985217515,
            'flexAmount':0.0,
            'captureType':'ECOMMERCE',
            'feeTotal':2.14,
            'authorizationCode':39196,
            'amount':240.77,
            'netAmount':235.62,
            'device':'RO894937',
            'flex':False,
            'movementDate':'2019-07-31',
            'tokenized':False,
            'saleSummaryNumber':55849999,
            'flexFee':0.0,
            'deviceType':'ECO',
            'brandCode':2,
            'orderNumber':'73727180048563',
            'merchant':{ 
               'companyNumber':'77879899',
               'companyName':'WESTWING',
               'documentNumber':'14776142000150',
               'tradeName':'WESTWING COMERCIO VAREJISTA EIRELI'
            },
            'modality':{ 
               'type':'CREDIT',
               'code':1,
               'product':'IN_INSTALLMENTS_NO_INTEREST',
               'productCode':3
            }
         },
         { 
            'mdrFee':1.95,
            'saleDate':'2019-07-31',
            'mdrAmount':11.49,
            'cardNumber':'552305******8043',
            'tid':'10011907311932356031',
            'status':'APPROVED',
            'discountAmount':11.49,
            'installmentQuantity':1,
            'captureTypeCode':2,
            'tracking':[ 
               { 
                  'status':'APPROVED',
                  'date':'2019-07-31',
                  'amount':589.33
               }
            ],
            'boardingFeeAmount':0.0,
            'saleHour':'20:07:20',
            'nsu':985923121,
            'flexAmount':0.0,
            'captureType':'ECOMMERCE',
            'feeTotal':1.95,
            'authorizationCode':671890,
            'amount':589.33,
            'netAmount':577.84,
            'device':'RO894937',
            'flex':False,
            'movementDate':'2019-07-31',
            'tokenized':False,
            'saleSummaryNumber':42130922,
            'flexFee':0.0,
            'deviceType':'ECO',
            'brandCode':1,
            'orderNumber':'73727179637839',
            'merchant':{ 
               'companyNumber':'77879899',
               'companyName':'WESTWING',
               'documentNumber':'14776142000150',
               'tradeName':'WESTWING COMERCIO VAREJISTA EIRELI'
            },
            'modality':{ 
               'type':'CREDIT',
               'code':1,
               'product':'NO_INSTALLMENTS',
               'productCode':1
            }
         },
         { 
            'mdrFee':2.14,
            'saleDate':'2019-07-31',
            'mdrAmount':5.91,
            'cardNumber':'453211******2825',
            'tid':'10041907311935190905',
            'status':'APPROVED',
            'discountAmount':5.91,
            'installmentQuantity':4,
            'captureTypeCode':2,
            'tracking':[ 
               { 
                  'status':'APPROVED',
                  'date':'2019-07-31',
                  'amount':276.24
               }
            ],
            'boardingFeeAmount':0.0,
            'saleHour':'19:40:16',
            'nsu':985407789,
            'flexAmount':0.0,
            'captureType':'ECOMMERCE',
            'feeTotal':2.14,
            'authorizationCode':601392,
            'amount':276.24,
            'netAmount':270.33,
            'device':'RO894937',
            'flex':False,
            'movementDate':'2019-07-31',
            'tokenized':False,
            'saleSummaryNumber':55849999,
            'flexFee':0.0,
            'deviceType':'ECO',
            'brandCode':2,
            'orderNumber':'73727178013021',
            'merchant':{ 
               'companyNumber':'77879899',
               'companyName':'WESTWING',
               'documentNumber':'14776142000150',
               'tradeName':'WESTWING COMERCIO VAREJISTA EIRELI'
            },
            'modality':{ 
               'type':'CREDIT',
               'code':1,
               'product':'IN_INSTALLMENTS_NO_INTEREST',
               'productCode':3
            }
         },
         { 
            'mdrFee':1.95,
            'saleDate':'2019-07-31',
            'mdrAmount':0.47,
            'cardNumber':'515590******0984',
            'tid':'10021907311801172959',
            'status':'APPROVED',
            'discountAmount':0.47,
            'installmentQuantity':1,
            'captureTypeCode':2,
            'tracking':[ 
               { 
                  'status':'APPROVED',
                  'date':'2019-07-31',
                  'amount':24.01
               }
            ],
            'boardingFeeAmount':0.0,
            'saleHour':'18:14:33',
            'nsu':986233765,
            'flexAmount':0.0,
            'captureType':'ECOMMERCE',
            'feeTotal':1.95,
            'authorizationCode':143170,
            'amount':24.01,
            'netAmount':23.54,
            'device':'RO894937',
            'flex':False,
            'movementDate':'2019-07-31',
            'tokenized':False,
            'saleSummaryNumber':42130922,
            'flexFee':0.0,
            'deviceType':'ECO',
            'brandCode':1,
            'orderNumber':'73727172870108',
            'merchant':{ 
               'companyNumber':'77879899',
               'companyName':'WESTWING',
               'documentNumber':'14776142000150',
               'tradeName':'WESTWING COMERCIO VAREJISTA EIRELI'
            },
            'modality':{ 
               'type':'CREDIT',
               'code':1,
               'product':'NO_INSTALLMENTS',
               'productCode':1
            }
         },
         { 
            'mdrFee':2.14,
            'saleDate':'2019-07-31',
            'mdrAmount':14.27,
            'cardNumber':'546479******5740',
            'tid':'10031907311348266812',
            'status':'APPROVED',
            'discountAmount':14.27,
            'installmentQuantity':6,
            'captureTypeCode':2,
            'tracking':[ 
               { 
                  'status':'APPROVED',
                  'date':'2019-07-31',
                  'amount':666.99
               }
            ],
            'boardingFeeAmount':0.0,
            'saleHour':'17:12:48',
            'nsu':986258023,
            'flexAmount':0.0,
            'captureType':'ECOMMERCE',
            'feeTotal':2.14,
            'authorizationCode':98884,
            'amount':666.99,
            'netAmount':652.72,
            'device':'RO894937',
            'flex':False,
            'movementDate':'2019-07-31',
            'tokenized':False,
            'saleSummaryNumber':71549412,
            'flexFee':0.0,
            'deviceType':'ECO',
            'brandCode':1,
            'orderNumber':'73727158670934',
            'merchant':{ 
               'companyNumber':'77879899',
               'companyName':'WESTWING',
               'documentNumber':'14776142000150',
               'tradeName':'WESTWING COMERCIO VAREJISTA EIRELI'
            },
            'modality':{ 
               'type':'CREDIT',
               'code':1,
               'product':'IN_INSTALLMENTS_NO_INTEREST',
               'productCode':3
            }
         },
         { 
            'mdrFee':1.95,
            'saleDate':'2019-07-31',
            'mdrAmount':1.67,
            'cardNumber':'453211******7614',
            'tid':'10021907311509581669',
            'status':'APPROVED',
            'discountAmount':1.67,
            'installmentQuantity':1,
            'captureTypeCode':2,
            'tracking':[ 
               { 
                  'status':'APPROVED',
                  'date':'2019-07-31',
                  'amount':85.47
               }
            ],
            'boardingFeeAmount':0.0,
            'saleHour':'16:35:55',
            'nsu':988351587,
            'flexAmount':0.0,
            'captureType':'ECOMMERCE',
            'feeTotal':1.95,
            'authorizationCode':664342,
            'amount':85.47,
            'netAmount':83.8,
            'device':'RO894937',
            'flex':False,
            'movementDate':'2019-07-31',
            'tokenized':False,
            'saleSummaryNumber':33730791,
            'flexFee':0.0,
            'deviceType':'ECO',
            'brandCode':2,
            'orderNumber':'73727162202452',
            'merchant':{ 
               'companyNumber':'77879899',
               'companyName':'WESTWING',
               'documentNumber':'14776142000150',
               'tradeName':'WESTWING COMERCIO VAREJISTA EIRELI'
            },
            'modality':{ 
               'type':'CREDIT',
               'code':1,
               'product':'NO_INSTALLMENTS',
               'productCode':1
            }
         },
         { 
            'mdrFee':2.14,
            'saleDate':'2019-07-31',
            'mdrAmount':5.39,
            'cardNumber':'552693******4379',
            'tid':'10021907311100231517',
            'status':'APPROVED',
            'discountAmount':5.39,
            'installmentQuantity':2,
            'captureTypeCode':2,
            'tracking':[ 
               { 
                  'status':'APPROVED',
                  'date':'2019-07-31',
                  'amount':252.06
               }
            ],
            'boardingFeeAmount':0.0,
            'saleHour':'16:35:00',
            'nsu':987025813,
            'flexAmount':0.0,
            'captureType':'ECOMMERCE',
            'feeTotal':2.14,
            'authorizationCode':73285,
            'amount':252.06,
            'netAmount':246.67,
            'device':'RO894937',
            'flex':False,
            'movementDate':'2019-07-31',
            'tokenized':False,
            'saleSummaryNumber':71549412,
            'flexFee':0.0,
            'deviceType':'ECO',
            'brandCode':1,
            'orderNumber':'73727147251522',
            'merchant':{ 
               'companyNumber':'77879899',
               'companyName':'WESTWING',
               'documentNumber':'14776142000150',
               'tradeName':'WESTWING COMERCIO VAREJISTA EIRELI'
            },
            'modality':{ 
               'type':'CREDIT',
               'code':1,
               'product':'IN_INSTALLMENTS_NO_INTEREST',
               'productCode':3
            }
         },
         { 
            'mdrFee':2.14,
            'saleDate':'2019-07-31',
            'mdrAmount':3.44,
            'cardNumber':'549167******1466',
            'tid':'10021907302311575607',
            'status':'APPROVED',
            'discountAmount':3.44,
            'installmentQuantity':4,
            'captureTypeCode':2,
            'tracking':[ 
               { 
                  'status':'APPROVED',
                  'date':'2019-07-31',
                  'amount':160.84
               }
            ],
            'boardingFeeAmount':0.0,
            'saleHour':'16:33:06',
            'nsu':986985977,
            'flexAmount':0.0,
            'captureType':'ECOMMERCE',
            'feeTotal':2.14,
            'authorizationCode':4221,
            'amount':160.84,
            'netAmount':157.4,
            'device':'RO894937',
            'flex':False,
            'movementDate':'2019-07-31',
            'tokenized':False,
            'saleSummaryNumber':71549412,
            'flexFee':0.0,
            'deviceType':'ECO',
            'brandCode':1,
            'orderNumber':'73727106575942',
            'merchant':{ 
               'companyNumber':'77879899',
               'companyName':'WESTWING',
               'documentNumber':'14776142000150',
               'tradeName':'WESTWING COMERCIO VAREJISTA EIRELI'
            },
            'modality':{ 
               'type':'CREDIT',
               'code':1,
               'product':'IN_INSTALLMENTS_NO_INTEREST',
               'productCode':3
            }
         },
         { 
            'mdrFee':2.14,
            'saleDate':'2019-07-31',
            'mdrAmount':7.08,
            'cardNumber':'552693******4379',
            'tid':'11071907301800587585',
            'status':'APPROVED',
            'discountAmount':7.08,
            'installmentQuantity':2,
            'captureTypeCode':2,
            'tracking':[ 
               { 
                  'status':'APPROVED',
                  'date':'2019-07-31',
                  'amount':330.96
               }
            ],
            'boardingFeeAmount':0.0,
            'saleHour':'16:31:59',
            'nsu':986896321,
            'flexAmount':0.0,
            'captureType':'ECOMMERCE',
            'feeTotal':2.14,
            'authorizationCode':480785,
            'amount':330.96,
            'netAmount':323.88,
            'device':'RO894937',
            'flex':False,
            'movementDate':'2019-07-31',
            'tokenized':False,
            'saleSummaryNumber':71549412,
            'flexFee':0.0,
            'deviceType':'ECO',
            'brandCode':1,
            'orderNumber':'73727074886096',
            'merchant':{ 
               'companyNumber':'77879899',
               'companyName':'WESTWING',
               'documentNumber':'14776142000150',
               'tradeName':'WESTWING COMERCIO VAREJISTA EIRELI'
            },
            'modality':{ 
               'type':'CREDIT',
               'code':1,
               'product':'IN_INSTALLMENTS_NO_INTEREST',
               'productCode':3
            }
         },
         { 
            'mdrFee':2.14,
            'saleDate':'2019-07-31',
            'mdrAmount':9.7,
            'cardNumber':'422061******9534',
            'tid':'10021907311430355387',
            'status':'APPROVED',
            'discountAmount':9.7,
            'installmentQuantity':2,
            'captureTypeCode':2,
            'tracking':[ 
               { 
                  'status':'APPROVED',
                  'date':'2019-07-31',
                  'amount':453.44
               }
            ],
            'boardingFeeAmount':0.0,
            'saleHour':'14:51:34',
            'nsu':990043277,
            'flexAmount':0.0,
            'captureType':'ECOMMERCE',
            'feeTotal':2.14,
            'authorizationCode':513258,
            'amount':453.44,
            'netAmount':443.74,
            'device':'RO894937',
            'flex':False,
            'movementDate':'2019-07-31',
            'tokenized':False,
            'saleSummaryNumber':55849999,
            'flexFee':0.0,
            'deviceType':'ECO',
            'brandCode':2,
            'orderNumber':'73727160691192',
            'merchant':{ 
               'companyNumber':'77879899',
               'companyName':'WESTWING',
               'documentNumber':'14776142000150',
               'tradeName':'WESTWING COMERCIO VAREJISTA EIRELI'
            },
            'modality':{ 
               'type':'CREDIT',
               'code':1,
               'product':'IN_INSTALLMENTS_NO_INTEREST',
               'productCode':3
            }
         },
         { 
            'mdrFee':2.26,
            'saleDate':'2019-07-31',
            'mdrAmount':8.41,
            'cardNumber':'606282******6915',
            'tid':'10021907311349120123',
            'status':'APPROVED',
            'discountAmount':8.41,
            'installmentQuantity':6,
            'captureTypeCode':2,
            'tracking':[ 
               { 
                  'status':'APPROVED',
                  'date':'2019-07-31',
                  'amount':371.92
               }
            ],
            'boardingFeeAmount':0.0,
            'saleHour':'13:49:44',
            'nsu':991412707,
            'flexAmount':0.0,
            'captureType':'ECOMMERCE',
            'feeTotal':2.26,
            'authorizationCode':68408,
            'amount':371.92,
            'netAmount':363.51,
            'device':'RO894937',
            'flex':False,
            'movementDate':'2019-07-31',
            'tokenized':False,
            'saleSummaryNumber':71549413,
            'flexFee':0.0,
            'deviceType':'ECO',
            'brandCode':7,
            'orderNumber':'73727156981832',
            'merchant':{ 
               'companyNumber':'77879899',
               'companyName':'WESTWING',
               'documentNumber':'14776142000150',
               'tradeName':'WESTWING COMERCIO VAREJISTA EIRELI'
            },
            'modality':{ 
               'type':'CREDIT',
               'code':1,
               'product':'IN_INSTALLMENTS_NO_INTEREST',
               'productCode':3
            }
         },
         { 
            'mdrFee':1.95,
            'saleDate':'2019-07-31',
            'mdrAmount':4.84,
            'cardNumber':'498401******2540',
            'tid':'10041907311111145676',
            'status':'APPROVED',
            'discountAmount':4.84,
            'installmentQuantity':1,
            'captureTypeCode':2,
            'tracking':[ 
               { 
                  'status':'APPROVED',
                  'date':'2019-07-31',
                  'amount':248.41
               }
            ],
            'boardingFeeAmount':0.0,
            'saleHour':'11:39:58',
            'nsu':992730647,
            'flexAmount':0.0,
            'captureType':'ECOMMERCE',
            'feeTotal':1.95,
            'authorizationCode':853512,
            'amount':248.41,
            'netAmount':243.57,
            'device':'RO894937',
            'flex':False,
            'movementDate':'2019-07-31',
            'tokenized':False,
            'saleSummaryNumber':33730791,
            'flexFee':0.0,
            'deviceType':'ECO',
            'brandCode':2,
            'orderNumber':'73727149195438',
            'merchant':{ 
               'companyNumber':'77879899',
               'companyName':'WESTWING',
               'documentNumber':'14776142000150',
               'tradeName':'WESTWING COMERCIO VAREJISTA EIRELI'
            },
            'modality':{ 
               'type':'CREDIT',
               'code':1,
               'product':'NO_INSTALLMENTS',
               'productCode':1
            }
         },
         { 
            'mdrFee':2.14,
            'saleDate':'2019-07-31',
            'mdrAmount':6.45,
            'cardNumber':'527496******4009',
            'tid':'10041907311111144184',
            'status':'APPROVED',
            'discountAmount':6.45,
            'installmentQuantity':5,
            'captureTypeCode':2,
            'tracking':[ 
               { 
                  'status':'APPROVED',
                  'date':'2019-07-31',
                  'amount':301.28
               }
            ],
            'boardingFeeAmount':0.0,
            'saleHour':'11:32:43',
            'nsu':991867195,
            'flexAmount':0.0,
            'captureType':'ECOMMERCE',
            'feeTotal':2.14,
            'authorizationCode':45582,
            'amount':301.28,
            'netAmount':294.83,
            'device':'RO894937',
            'flex':False,
            'movementDate':'2019-07-31',
            'tokenized':False,
            'saleSummaryNumber':71549412,
            'flexFee':0.0,
            'deviceType':'ECO',
            'brandCode':1,
            'orderNumber':'73727148760379',
            'merchant':{ 
               'companyNumber':'77879899',
               'companyName':'WESTWING',
               'documentNumber':'14776142000150',
               'tradeName':'WESTWING COMERCIO VAREJISTA EIRELI'
            },
            'modality':{ 
               'type':'CREDIT',
               'code':1,
               'product':'IN_INSTALLMENTS_NO_INTEREST',
               'productCode':3
            }
         },
         { 
            'mdrFee':2.14,
            'saleDate':'2019-07-31',
            'mdrAmount':2.83,
            'cardNumber':'490172******8882',
            'tid':'10011907311044378387',
            'status':'APPROVED',
            'discountAmount':2.83,
            'installmentQuantity':2,
            'captureTypeCode':2,
            'tracking':[ 
               { 
                  'status':'APPROVED',
                  'date':'2019-07-31',
                  'amount':132.18
               }
            ],
            'boardingFeeAmount':0.0,
            'saleHour':'11:30:48',
            'nsu':992641417,
            'flexAmount':0.0,
            'captureType':'ECOMMERCE',
            'feeTotal':2.14,
            'authorizationCode':38433,
            'amount':132.18,
            'netAmount':129.35,
            'device':'RO894937',
            'flex':False,
            'movementDate':'2019-07-31',
            'tokenized':False,
            'saleSummaryNumber':55849999,
            'flexFee':0.0,
            'deviceType':'ECO',
            'brandCode':2,
            'orderNumber':'73727148645585',
            'merchant':{ 
               'companyNumber':'77879899',
               'companyName':'WESTWING',
               'documentNumber':'14776142000150',
               'tradeName':'WESTWING COMERCIO VAREJISTA EIRELI'
            },
            'modality':{ 
               'type':'CREDIT',
               'code':1,
               'product':'IN_INSTALLMENTS_NO_INTEREST',
               'productCode':3
            }
         },
         { 
            'mdrFee':2.14,
            'saleDate':'2019-07-31',
            'mdrAmount':8.61,
            'cardNumber':'410863******3119',
            'tid':'10011907311044377627',
            'status':'APPROVED',
            'discountAmount':8.61,
            'installmentQuantity':2,
            'captureTypeCode':2,
            'tracking':[ 
               { 
                  'status':'APPROVED',
                  'date':'2019-07-31',
                  'amount':402.29
               }
            ],
            'boardingFeeAmount':0.0,
            'saleHour':'11:26:30',
            'nsu':991917217,
            'flexAmount':0.0,
            'captureType':'ECOMMERCE',
            'feeTotal':2.14,
            'authorizationCode':262859,
            'amount':402.29,
            'netAmount':393.68,
            'device':'RO894937',
            'flex':False,
            'movementDate':'2019-07-31',
            'tokenized':False,
            'saleSummaryNumber':55849999,
            'flexFee':0.0,
            'deviceType':'ECO',
            'brandCode':2,
            'orderNumber':'73727148387645',
            'merchant':{ 
               'companyNumber':'77879899',
               'companyName':'WESTWING',
               'documentNumber':'14776142000150',
               'tradeName':'WESTWING COMERCIO VAREJISTA EIRELI'
            },
            'modality':{ 
               'type':'CREDIT',
               'code':1,
               'product':'IN_INSTALLMENTS_NO_INTEREST',
               'productCode':3
            }
         },
         { 
            'mdrFee':2.14,
            'saleDate':'2019-07-31',
            'mdrAmount':5.26,
            'cardNumber':'422061******0053',
            'tid':'10011907311044372196',
            'status':'APPROVED',
            'discountAmount':5.26,
            'installmentQuantity':4,
            'captureTypeCode':2,
            'tracking':[ 
               { 
                  'status':'APPROVED',
                  'date':'2019-07-31',
                  'amount':245.63
               }
            ],
            'boardingFeeAmount':0.0,
            'saleHour':'10:55:58',
            'nsu':992693269,
            'flexAmount':0.0,
            'captureType':'ECOMMERCE',
            'feeTotal':2.14,
            'authorizationCode':555649,
            'amount':245.63,
            'netAmount':240.37,
            'device':'RO894937',
            'flex':False,
            'movementDate':'2019-07-31',
            'tokenized':False,
            'saleSummaryNumber':55849999,
            'flexFee':0.0,
            'deviceType':'ECO',
            'brandCode':2,
            'orderNumber':'73727146555523',
            'merchant':{ 
               'companyNumber':'77879899',
               'companyName':'WESTWING',
               'documentNumber':'14776142000150',
               'tradeName':'WESTWING COMERCIO VAREJISTA EIRELI'
            },
            'modality':{ 
               'type':'CREDIT',
               'code':1,
               'product':'IN_INSTALLMENTS_NO_INTEREST',
               'productCode':3
            }
         },
         { 
            'mdrFee':1.95,
            'saleDate':'2019-07-31',
            'mdrAmount':3.17,
            'cardNumber':'422061******0516',
            'tid':'10031907311000456758',
            'status':'APPROVED',
            'discountAmount':3.17,
            'installmentQuantity':1,
            'captureTypeCode':2,
            'tracking':[ 
               { 
                  'status':'APPROVED',
                  'date':'2019-07-31',
                  'amount':162.59
               }
            ],
            'boardingFeeAmount':0.0,
            'saleHour':'10:32:47',
            'nsu':992614861,
            'flexAmount':0.0,
            'captureType':'ECOMMERCE',
            'feeTotal':1.95,
            'authorizationCode':324552,
            'amount':162.59,
            'netAmount':159.42,
            'device':'RO894937',
            'flex':False,
            'movementDate':'2019-07-31',
            'tokenized':False,
            'saleSummaryNumber':33730791,
            'flexFee':0.0,
            'deviceType':'ECO',
            'brandCode':2,
            'orderNumber':'73727145164601',
            'merchant':{ 
               'companyNumber':'77879899',
               'companyName':'WESTWING',
               'documentNumber':'14776142000150',
               'tradeName':'WESTWING COMERCIO VAREJISTA EIRELI'
            },
            'modality':{ 
               'type':'CREDIT',
               'code':1,
               'product':'NO_INSTALLMENTS',
               'productCode':1
            }
         },
         { 
            'mdrFee':1.95,
            'saleDate':'2019-07-31',
            'mdrAmount':2.08,
            'cardNumber':'512682******6256',
            'tid':'10021907310833001413',
            'status':'APPROVED',
            'discountAmount':2.08,
            'installmentQuantity':1,
            'captureTypeCode':2,
            'tracking':[ 
               { 
                  'status':'APPROVED',
                  'date':'2019-07-31',
                  'amount':106.73
               }
            ],
            'boardingFeeAmount':0.0,
            'saleHour':'08:43:09',
            'nsu':993914765,
            'flexAmount':0.0,
            'captureType':'ECOMMERCE',
            'feeTotal':1.95,
            'authorizationCode':699438,
            'amount':106.73,
            'netAmount':104.65,
            'device':'RO894937',
            'flex':False,
            'movementDate':'2019-07-31',
            'tokenized':False,
            'saleSummaryNumber':42130922,
            'flexFee':0.0,
            'deviceType':'ECO',
            'brandCode':1,
            'orderNumber':'73727138585532',
            'merchant':{ 
               'companyNumber':'77879899',
               'companyName':'WESTWING',
               'documentNumber':'14776142000150',
               'tradeName':'WESTWING COMERCIO VAREJISTA EIRELI'
            },
            'modality':{ 
               'type':'CREDIT',
               'code':1,
               'product':'NO_INSTALLMENTS',
               'productCode':1
            }
         }
      ]
   }
}
vendas = dataALL['content']['transactions']

test = JsonToCsv(vendas, tmp/'out3.csv')

License: BSD

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

json2csvrede-1.2.tar.gz (9.3 kB view details)

Uploaded Source

File details

Details for the file json2csvrede-1.2.tar.gz.

File metadata

  • Download URL: json2csvrede-1.2.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/2.7.16

File hashes

Hashes for json2csvrede-1.2.tar.gz
Algorithm Hash digest
SHA256 b4ab33ca317403a2291c2801bec0b86431ef817a3fc068779d89db263de630c0
MD5 e574ba83b4d61ea9d10c625ab5bc4044
BLAKE2b-256 677b42fd6b73b5360052669aa9c1d3c98702025d8f7b271fff6bc5f63f371cee

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page