I would like to pass the json response to the steering wheel. I looked at syntax analysis questions and stack questions, but I can't figure it out.
This is the answer:
{"results":[{"address":"755 W. Yale","createdAt":"2013-02-09T01:12:15.732Z","updatedAt":"2013-02-09T01:12:15.732Z","objectId":"JomKPfme5M"}]}
This is my handlebars template:
<script id="post-template" type="text/x-handlebars-template"> <h1>{{address}}</h1> </script>
This is a script
Parse.initialize("xxxxxx", "yyyyyy"); var listingsView = Parse.Object.extend("listings"); var query = new Parse.Query(listingsView); query.equalTo("objectId", "JomKPfme5M"); query.first({ success: function(results){ var source = $('#post-template').html(); var template = Handlebars.compile(source); var html = template(results); }, error: function(object, error){ console.log(error); } });
thanks
source share