I'm encountering an issue where this code works perfectly if "obj" is a collection, but falls short when trying to determine if a value exists within a single object. What would be the most efficient approach, utilizing either lodash or AngularJS, to check if a search term is present within an object? Thank you!
var obj = {
id: 4,
name: 'test',
value: 'car',
description: 'I like soup'
}
var searchTerm= 'soup';
var testObject = function(){
var status = true;
status = _.some(obj, searchTerm);
console.dir(status);
}
testObject();
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.9/angular.min.js"></script>
<script src="lodash.js"></script>