I'm working on a site where I'm using an API to connect to a database. I want to get the data from the database IF the elements includes a specific "i:field". If they don't include that specific "i:field" I have no use for them in my project.
Right now my code looks like this
var doomed = TAFFY();
$.getJSON("link_to_API", function( data ) {
doomed.insert(data);
});
I would like to do something like "if the data includes doomed.number == "5", insert it"
var doomed = TAFFY();
$.getJSON("link_to_API", function( data ) {
if (doomed.number == "5") {
doomed.insert(data);
}
});
Do you know if it's possible?