Guest User

Untitled

a guest
Aug 17th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. jQuery GREP JSON empty data filter
  2. $(data.content).each(function(index, content){
  3. $("#htmlID").append('<span>' + content.myinfo + ');
  4. });
  5. {
  6.  
  7. "content":
  8.  
  9. [
  10. {"myinfo":"Bill Clinton 095 years old. "},
  11. {" "},
  12. {"myinfo":"Bill Clinton 295 years old. "},
  13. {" "}
  14.  
  15. ]
  16. }
  17.  
  18. $(data.content).each(function(index, content){
  19. if(!(typeof content.myinfo === "undefined" ||
  20. content.myinfo.length<1)){
  21. $("#htmlID").append('<span>' + content.myinfo);
  22. }
  23. });
  24.  
  25. {" ": ""}
Add Comment
Please, Sign In to add comment