jquery - Appending to HTML a content of a Javascript object -


I'm trying to solve this small problem. <<..

Recover data using parse.com for and I have a JSON object, I want to attach an HTML

  var tempObject = Parse.Object.extend ("Dev") I am trying to recover a part of; Var query = new pars; tempObject; Query.notEqualTo ("objectId", "Dan Stemkoski"); (Var i = 0; i & lt; results.length; i ++) {var object = results} {search_find} ({success: function) {alert ("successfully recovered" + results.length + "receipts" ); I]; $ ("Receipts"). Html (object.get ('receipt_title')); console.log (object) //alert(object.id + '-' + object.get ('receipt_title' ));   

The result I

  

Unfortunately for some reason, I'm getting only one row instead of 10, which I should get. I know that I get results in any way There should be a loop for me, but all my efforts have failed me till now.

Thanks in advance for help!

You have to add the result to HTML, as you can now change it to the previous result with the next one.

  $ (" # Acquisition "). Try HTML code (instead of 'receipt_title');   

Try

  var html = $ ("#addings"). Html (); $ ("# Acquisitions") Html (html + object.get ('Receipt_title'));   

In addition, just to mention, if you want to become proficient, then it would be better to add it only in one variable and just write the dome once. Therefore:

  var html = ""; (/ * For your loop here, all right * /) {/ * $ ("# receipts") Html () line * / html + = object.get ('receipt_title'); } $ ("# Acquisitions") Html (html);   

Less often, when you improve DOM, better.

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -