JSFiddle - React, Tailwind, and code Playground
by ItsLeeOwen
HTML
<script src="http://underscorejs.org/underscore-min.js"></script>
<link rel="stylesheet" href="http://twitter.github.io/bootstrap/assets/css/bootstrap.css">
<script src="https://dl.dropboxusercontent.com/u/7218835/stackmob/headers.js"></script>
<div id="out"></div>
JavaScript
// attempting to return two objects from superhero schema
// where name is clark and hero is superman
// or name is peter and hero is spiderman
// both objects exist in the database,
// but only one is returned by the following query
var url = "http://api.stackmob.com/superhero?[or1].[and1].name=peter&[or1].[and1].hero=spiderman&[or1].[and2].name=clark&[or1].[and2].hero=superman";
$.ajax({
url: url,
type: "GET",
headers: headers,
success: function() {
console.log(arguments[0]);
$('#out').html('results: '+arguments[0].length+': '+JSON.stringify(arguments[0]));
}
});