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

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -