I have problem in decoding the array passed from PHP. My PHP code is
$checkedJson = json_encode($dynamic_species);
$tmp = exec("/Python33/arr_pass.py $pressure $temp $checkedJson");
return $tmp;
If i print $checkedJson i get
{"species1":"CH4","species2":"C2H6"} as print statement
My python code is
species_list = sys.argv[3]
species_list_data = json.loads(species_list)
print(species_list_data['species1'])
This python script returns empty string as output to php
I am working for first time on JSON can anyone please help me.
Thanks in advance