lundi 25 janvier 2016

How to get json value from response ajax?

My json response is like this : http://ift.tt/1KzPnsF

I want display HotelNo, RmGrade, Meal and TotalRate

I try like this :

...
    success: function (response) {
                        console.log(response);
                        $.each(response, function() {
                          $.each(this, function(k, v) {
                                // console.log(k);
                                // console.log(v);

                                setTimeout(function () {
                                    $parent.find('.loading').html(v.HotelNo + '<br>' + v.RmGrade + '<br>' + v.Meal + '<br>' + v.TotalRate);
                                }, 2000);

                         });
                        });
                    }
...

But it's not working

How to get json value from response ajax correctly?

Any solution to solve my problem

Thank you very much



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire