Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Split of key from JSON response
#1
HI Team,

I get a json response of keys & values from api as below
'fm_data': {'LineofBusiness~PoleBranch~Region~MappedName~MappedNameSub~Owner~::~PMC~APAC~China~PMC-CHINA~PMC-CHINA~Leo Pan': {'aggregate': {'fc0_crm': 206000.0,
'fcn0_crm': 107000.0,
'fcn2_crm': 313000.0,
'fcPipe_crm': 50000.0},
'PMC ModSys': {'fc0_crm': 195000.0,
'fcn0_crm': 107000.0,
'fcn2_crm': 302000.0},
'PMC FI / PI': {'fc0_crm': 11000.0,
'fcn2_crm': 11000.0,
'fcPipe_crm': 50000.0}},
'LineofBusiness~PoleBranch~Region~MappedName~::~SME~APAC~India~SME-India': {'aggregate': {'fc0_crm': 622836.6,
'fcn0_crm': 213587.0,
'fcn2_crm': 622836.6},
'SME Electric': {'fc0_crm': 43300.3,
'fcn0_crm': 213587.0,
'fcn2_crm': 43300.3},
'SME Gas': {'fc0_crm': 579536.2,
'fcn0_crm': 214302.5,
'fcn2_crm': 579536.2}},
'LineofBusiness~PoleBranch~Region~MappedName~MappedNameSub~Owner~::~HTS~APAC~India~HTS-IND West~HTS-IND West~Vivekananda Majumder': {'aggregate': {'fcn0_crm': 100000.0,
'fcn2_crm': 100000.0},
'HTS ETO': {'fcn0_crm': 100000.0, 'fcn2_crm': 100000.0}},
'LineofBusiness~PoleBranch~Region~MappedName~::~HCP~AMER~CSAR~HCP-Andean/Caribbean': {'aggregate': {'fc0_crm': 522928.4,
'fcn0_crm': 248137.7,
'fcn2_crm': 788916.4,
'fcPipe_crm': 308597.7,
'fc8_crm': 17850.2},
'HCP Software': {'fc0_crm': 33922.2,
'fcn0_crm': 20000.0,
'fcn2_crm': 53922.2,
'fcPipe_crm': 300023.0},
'HCP Base': {'fc0_crm': 489006.2,
'fcn0_crm': 228137.7,
'fcn2_crm': 734994.1,
'fcPipe_crm': 8574.7,
'fc8_crm': 17850.2}}}

I need to get a output like(Delimeter is ~ & ~::~) which need to be separated to different column:
LineofBusiness PoleBranch Region MappedName MappedNameSub Owner LOB Type value
PMC APAC China PMC-CHINA PMC-CHINA Leo Pan
SME APAC India SME-India Null Null
.....

for each value as rows.

Thanks in advance.
Quote

Top Page

Messages In This Thread
Split of key from JSON response - by aswini_dubey - Dec-04-2019, 02:12 PM
RE: Split of key from JSON response - by Larz60+ - Dec-04-2019, 06:54 PM

Possibly Related Threads...
Thread Author Replies Views Last Post
  How to process JSON response from requests? Heinrich 5 278 Jan-10-2020, 06:17 PM
Last Post: Heinrich
  [split] Print JSON Dictionary to Excel? venukommu 1 220 Nov-15-2019, 09:33 PM
Last Post: micseydel
  [split] Reading json from webpage rajesh1997 1 333 Feb-05-2019, 12:07 PM
Last Post: buran
  [split] How to insert JSON into MSSQL gehrenfeld 3 584 Jan-27-2019, 06:20 PM
Last Post: micseydel
  [split] Json to CSV satish 5 1,701 Jul-12-2017, 03:30 PM
Last Post: micseydel

Forum Jump:


Users browsing this thread: 1 Guest(s)