Guest User

Untitled

a guest
Mar 20th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. success: function(data) {
  2. $.each(data, function() {
  3. $.each(this, function(k, v) {
  4. //do something with v
  5. });
  6. });
  7. }
  8.  
  9. lst1 = [1, 2, 3, 4, 5]
  10. lst2 = ['a', 'b', 'c', 'd', 'e']
  11.  
  12. context = {
  13. 'labels' : lst1,
  14. 'sk_labels': lst2
  15. }
  16.  
  17. return HttpResponse(json.dumps(context), content_type='application/json')
Add Comment
Please, Sign In to add comment