I'm kinda stuck with an issue. This is the response for my AJAX call.
var test = [
{
"analytics.feature": "false"
},
{
"demo": "true"
},
{
"analytics.demo": "false"
}
]
Now I want to check if analytics.demo is enabled or disabled.
Can I use _.find?
_.find(test, {analytics.demo});
//returns error
I just want to do this
if(analytics.demo) {
//Do something
}
How do I do that? Can someone help?
Instead of iterating objects and comparing, can I use underscorejs/jQuery to get the exact value for a key?