Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

JSON to dictionary

import json 
    
# JSON string 
employee ='{"id":"09", "name": "Nitin", "department":"Finance"}'
    
# Convert string to Python dict 
employee_dict = json.loads(employee) 
print(employee_dict) 
    
print(employee_dict['name'])
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #JSON #dictionary
ADD COMMENT
Topic
Name
1+3 =