Как добавить dict a в response и как я могу получить two objects в ajax ?

Посмотреть

 def abc(request): cp = Cp.objects.get(id=1) cp = serializers.serialize('json', [cp,]) cp = json.loads(cp) a = {'a': 'a', 'b': 'b'} return HttpResponse(data) 

JS

 $.ajax({ // success: function(data){ } }) 

Спасибо @WillemVanOnsem за помощь

взгляды

 def abc(request): cp = serializers.serialize('json', [cp,]) cp = json.loads(cp) cp = json.dumps(cp) other = {'rate': float(rate), 'eair': float(eair), 'overpayment': overpayment, 'total_payment': round(total_payment), 'monthly_payment':round(monthly_payment)} return JsonResponse({'cp': cp, 'other': other}) 

JS

  $.ajax({ // success: function(data) { var cp_json = JSON.parse(data.cp); var other = data.other; var credit_payment = cp_json[0].fields; $('.rate').html(credit_payment.rate   '%') } })