I have an array that has first rows as header:
array = [[ 'combi', 'DQ#', 'sd', 'Level 3', 'Level 6', 'Level 7' ], [ 'DQn DQDC Simple','DQn', 'DQDC', 'Simple', 'Simple_A7', 0.262],[ 'DQn DQDC Simple1','DQn', 'DQDC', 'Simple1', 'Simple_A7', 0.264]]
convert this into a json object format:
new_obj = [{"combi":"DQ8 DQDC Simple","DQ#":"DQ8","Level 3":"DQDC","Level 6":"Simple","Level 7":"Simple_A7","sc_7":0.262}, {"combi":"DQ8 DQDC Simple1","DQ#":"DQ8","Level 3":"DQDC","Level 6":"Simple1","Level 7":"Simple_A7","sc_7":0.264}]
I've tried searching a lot on StackOverflow but didn't find the answer. Any suggestions would be highly appreciated