json object length in javascript
const data = { a : 'b', c : 'd' };
const length = Object.keys(data).length;
//Length is 2
json object length in javascript
const data = { a : 'b', c : 'd' };
const length = Object.keys(data).length;
//Length is 2
length of json object python
import json
json_data = json.dumps({
"result":[
{
"run":[
{
"action":"stop"
},
{
"action":"start"
},
{
"action":"start"
}
],
"find": "true"
}
]
})
item_dict = json.loads(json_data)
print len(item_dict['result'][0]['run'])
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us