javascript - lodash find object inside object -


i trying return true if object exists with

var primary={   "rhid": {     "type": "numeric"   },   "cd_doc_id": {     "type": "numeric"   },   "seq": {     "type": "numeric"   } }  console.log(_.contains(primary, 'rhid')) 

but aways false. thanks

you can use _.has method

console.log(_.has(primary, 'rhid')) 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -