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 - Extract Text from HTTP referer -

Receive udp packets in android gstreamer -

ios - How to Rectify the Relationship Fault in CoreData While parsing RESTKIT? -